add test for if notification doesn't exist on repository

This commit is contained in:
2025-02-04 11:35:24 -08:00
parent 71698da173
commit e667e89556

View File

@@ -138,7 +138,19 @@ describe("MutationResolvers", () => {
});
it("fails if the notification doesn't exist", async () => {
const notificationInput = {
deviceId: "1",
shuttleId: "1",
stopId: "1",
}
const response = await getServerResponse(query, notificationInput);
assert(response.body.kind === "single");
expect(response.body.singleResult.errors).toBeUndefined();
const notificationResponse = response.body.singleResult.data?.cancelNotification as any;
expect(notificationResponse.success).toBe(false);
});
});
});