From 69e2748eec49678bd6283f8be380b47e5cc23840 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Tue, 4 Feb 2025 11:25:31 -0800 Subject: [PATCH] add additional check for notification service scheduling --- test/resolvers/MutationResolverTests.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/resolvers/MutationResolverTests.test.ts b/test/resolvers/MutationResolverTests.test.ts index 86ff7a6..afad9d8 100644 --- a/test/resolvers/MutationResolverTests.test.ts +++ b/test/resolvers/MutationResolverTests.test.ts @@ -56,6 +56,8 @@ describe("MutationResolvers", () => { const notificationResponse = response.body.singleResult.data?.scheduleNotification as any; expect(notificationResponse?.success).toBe(true); expect(notificationResponse?.notification).toStrictEqual(notificationInput); + + expect(context.notificationService.isNotificationScheduled(notificationInput)).toBe(true); }); it("fails if the shuttle ID doesn't exist", async () => { @@ -73,6 +75,8 @@ describe("MutationResolvers", () => { expect(response.body.singleResult.errors).toBeUndefined(); const notificationResponse = response.body.singleResult.data?.scheduleNotification as any; expect(notificationResponse.success).toBe(false); + + expect(context.notificationService.isNotificationScheduled(notificationInput)).toBe(false); }); it("fails if the stop ID doesn't exist", async () => { @@ -90,6 +94,8 @@ describe("MutationResolvers", () => { expect(response.body.singleResult.errors).toBeUndefined(); const notificationResponse = response.body.singleResult.data?.scheduleNotification as any; expect(notificationResponse.success).toBe(false); + + expect(context.notificationService.isNotificationScheduled(notificationInput)).toBe(false); }); });