From 420682dbb852a612fd5fcb8d0aea55e88782a0c8 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Wed, 12 Feb 2025 19:32:46 -0800 Subject: [PATCH] add arrange portion of first test --- .../services/NotificationServiceTests.test.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/services/NotificationServiceTests.test.ts b/test/services/NotificationServiceTests.test.ts index 9d28b22..85744b2 100644 --- a/test/services/NotificationServiceTests.test.ts +++ b/test/services/NotificationServiceTests.test.ts @@ -233,6 +233,29 @@ describe("NotificationService", () => { describe("getAllScheduledNotificationsForDevice", () => { it("returns scheduled notifications for the device ID", async () => { + // Arrange + const shuttle1 = await addMockShuttleToRepository(repository, "1"); + const stop = await addMockStopToRepository(repository, "1"); + const { eta, notificationData1 } = generateNotificationDataAndEta(shuttle1, stop); + await notificationService.scheduleNotification(notificationData1); + + const shuttle2 = { + ...shuttle1, + id: "2", + } + await repository.addOrUpdateShuttle(shuttle2); + + const notificationData2 = { + ...notificationData1, + shuttleId: shuttle2.id, + } + await notificationService.scheduleNotification(notificationData2); + + // Act + + // Assert + + });