diff --git a/test/resolvers/MutationResolverTests.test.ts b/test/resolvers/MutationResolverTests.test.ts index de6e190..2910586 100644 --- a/test/resolvers/MutationResolverTests.test.ts +++ b/test/resolvers/MutationResolverTests.test.ts @@ -100,7 +100,7 @@ describe("MutationResolvers", () => { describe("cancelNotification", () => { const query = ` - query CancelNotification($input: NotificationInput!) { + mutation CancelNotification($input: NotificationInput!) { cancelNotification(input: $input) { success message @@ -130,8 +130,9 @@ describe("MutationResolvers", () => { assert(response.body.kind === "single"); expect(response.body.singleResult.errors).toBeUndefined(); - const cancelledNotification = response.body.singleResult.data?.cancelNotification as any; - expect(cancelledNotification).toStrictEqual(notificationInput); + const notificationResponse = response.body.singleResult.data?.cancelNotification as any; + expect(notificationResponse.success).toBe(true); + expect(notificationResponse.data).toStrictEqual(notificationInput); expect(context.notificationService.isNotificationScheduled(notificationInput)).toBe(false); });