mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
add test for if notification doesn't exist on repository
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user