Multiple improvements
This commit is contained in:
@@ -149,7 +149,13 @@ test('route, POI, media and storage services cover successful and rejected lifec
|
||||
const indoorStation = routes.createPoi(db, indoor.id, { title: 'Ohne GPS', lat: null, lon: null });
|
||||
assert.equal(routes.getRoute(db, indoor.id).pois[0].lat, null);
|
||||
routes.updatePoi(db, indoor.id, indoorStation.id, { lat: 50, lon: 10 });
|
||||
assert.equal(routes.getRoute(db, indoor.id).pointCount, 1);
|
||||
assert.equal(db.prepare('SELECT min_lat FROM routes WHERE id=?').get(indoor.id).min_lat, 50);
|
||||
routes.updatePoi(db, indoor.id, indoorStation.id, { lat: 51, lon: 11 });
|
||||
const movedStationRoute = routes.getRoute(db, indoor.id);
|
||||
assert.equal(movedStationRoute.pointCount, 1);
|
||||
assert.equal(movedStationRoute.points[0].lat, 51);
|
||||
assert.equal(db.prepare('SELECT min_lat FROM routes WHERE id=?').get(indoor.id).min_lat, 51);
|
||||
routes.deletePoi(db, indoor.id, indoorStation.id);
|
||||
assert.equal(routes.getRoute(db, indoor.id).pointCount, 0);
|
||||
assert.equal(db.prepare('SELECT min_lat FROM routes WHERE id=?').get(indoor.id).min_lat, null);
|
||||
|
||||
Reference in New Issue
Block a user