mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
fix method calls and tests
This commit is contained in:
@@ -2,8 +2,8 @@ import { describe, expect, it } from "@jest/globals";
|
||||
import { generateMockSystems } from "../testHelpers/mockDataGenerators";
|
||||
import { setupTestServerContext, setupTestServerHolder } from "../testHelpers/apolloTestServerHelpers";
|
||||
import assert = require("node:assert");
|
||||
import { ScheduledNotification } from "../../src/notifications/schedulers/ETANotificationScheduler";
|
||||
import { addMockShuttleToRepository, addMockStopToRepository } from "../testHelpers/repositorySetupHelpers";
|
||||
import { ScheduledNotification } from "../../src/repositories/NotificationRepository";
|
||||
|
||||
// See Apollo documentation for integration test guide
|
||||
// https://www.apollographql.com/docs/apollo-server/testing/testing
|
||||
@@ -106,13 +106,13 @@ describe("QueryResolvers", () => {
|
||||
const shuttle = await addMockShuttleToRepository(context.shuttleRepository, "1");
|
||||
const stop = await addMockStopToRepository(context.shuttleRepository, "1")
|
||||
|
||||
const notification: NotificationSchedulingArguments = {
|
||||
const notification: ScheduledNotification = {
|
||||
shuttleId: shuttle.id,
|
||||
stopId: stop.id,
|
||||
deviceId: "1",
|
||||
secondsThreshold: 240,
|
||||
};
|
||||
await context.notificationRepository.scheduleNotification(notification);
|
||||
await context.notificationRepository.addOrUpdateNotification(notification);
|
||||
|
||||
const notificationLookup: any = {
|
||||
...notification,
|
||||
|
||||
Reference in New Issue
Block a user