diff --git a/test/notifications/schedulers/ETANotificationSchedulerTests.test.ts b/test/notifications/schedulers/ETANotificationSchedulerTests.test.ts index 60262c8..df528b9 100644 --- a/test/notifications/schedulers/ETANotificationSchedulerTests.test.ts +++ b/test/notifications/schedulers/ETANotificationSchedulerTests.test.ts @@ -65,10 +65,12 @@ describe("ETANotificationScheduler", () => { deviceId: "1", shuttleId: eta.shuttleId, stopId: eta.stopId, + secondsThreshold: 240, } const notificationData2 = { ...notificationData1, deviceId: "2", + secondsThreshold: 180, } return { eta, notificationData1, notificationData2 }; } @@ -79,7 +81,8 @@ describe("ETANotificationScheduler", () => { const notificationData = { deviceId: "1", shuttleId: "1", - stopId: "1" + stopId: "1", + secondsThreshold: 120, }; await notificationService.scheduleNotification(notificationData); @@ -117,7 +120,7 @@ describe("ETANotificationScheduler", () => { const shuttle = await addMockShuttleToRepository(repository, "1"); const stop = await addMockStopToRepository(repository, "1"); const { eta, notificationData1 } = generateNotificationDataAndEta(shuttle, stop); - eta.secondsRemaining = notificationService.secondsThresholdForNotificationToFire + 100; + notificationData1.secondsThreshold = eta.secondsRemaining - 10; // Act await notificationService.scheduleNotification(notificationData1);