mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 11:55:42 +00:00
Adding ticket generation and booking for staff employees logic
This commit is contained in:
@@ -71,7 +71,15 @@ test("BC-10 ✅ a schedule with a past departure is rejected by the API (past-da
|
||||
const arr = new Date(dep.getTime() + 4 * 3600e3);
|
||||
const okRes = await request.post(`${API_URL}/schedules`, {
|
||||
headers: auth(),
|
||||
data: { trainId: UI_IDS.train, routeId: ROUTE_ID, departureAt: dep.toISOString(), arrivalAt: arr.toISOString() },
|
||||
// ROUTE_ID has no route coach template, so createSchedule needs an explicit coach or it 400s
|
||||
// on the "zero coaches assigned" guard (see schedules.service.ts).
|
||||
data: {
|
||||
trainId: UI_IDS.train,
|
||||
routeId: ROUTE_ID,
|
||||
departureAt: dep.toISOString(),
|
||||
arrivalAt: arr.toISOString(),
|
||||
coachIds: [UI_IDS.coach],
|
||||
},
|
||||
});
|
||||
expect(okRes.ok()).toBeTruthy();
|
||||
const sched = (await okRes.json())?.data ?? {};
|
||||
|
||||
Reference in New Issue
Block a user