mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
Move duplicate shuttle declarations in tests to a "sample" shuttle generated by the setup function
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IOrderedStop, IStop } from "../src/entities/ShuttleRepositoryEntities";
|
||||
import { IOrderedStop, IShuttle, IStop } from "../src/entities/ShuttleRepositoryEntities";
|
||||
import { ShuttleGetterSetterRepository } from "../src/repositories/shuttle/ShuttleGetterSetterRepository";
|
||||
|
||||
export async function setupRouteAndOrderedStopsForShuttleRepository(
|
||||
@@ -71,11 +71,22 @@ export async function setupRouteAndOrderedStopsForShuttleRepository(
|
||||
await shuttleRepository.addOrUpdateOrderedStop(orderedStop2);
|
||||
await shuttleRepository.addOrUpdateOrderedStop(orderedStop3);
|
||||
|
||||
const sampleShuttleNotInRepository: IShuttle = {
|
||||
id: "sh1",
|
||||
name: "Shuttle 1",
|
||||
routeId: route.id,
|
||||
systemId: systemId,
|
||||
coordinates: stop2.coordinates,
|
||||
orientationInDegrees: 0,
|
||||
updatedTime: new Date(),
|
||||
};
|
||||
|
||||
return {
|
||||
route,
|
||||
systemId,
|
||||
stop1,
|
||||
stop2,
|
||||
stop3,
|
||||
sampleShuttleNotInRepository,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user