mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
fix the resolver result
This commit is contained in:
@@ -17,7 +17,7 @@ describe("MutationResolvers", () => {
|
||||
scheduleNotification(input: $input) {
|
||||
success
|
||||
message
|
||||
notification {
|
||||
data {
|
||||
deviceId
|
||||
shuttleId
|
||||
stopId
|
||||
@@ -48,9 +48,9 @@ describe("MutationResolvers", () => {
|
||||
assert(response.body.kind === "single");
|
||||
expect(response.body.singleResult.errors).toBeUndefined();
|
||||
|
||||
const returnedData = response.body.singleResult.data;
|
||||
expect(returnedData?.success).toBe(true);
|
||||
expect(returnedData?.notification).toStrictEqual(notificationInput);
|
||||
const notificationResponse = response.body.singleResult.data?.scheduleNotification as any;
|
||||
expect(notificationResponse?.success).toBe(true);
|
||||
expect(notificationResponse?.notification).toStrictEqual(notificationInput);
|
||||
});
|
||||
|
||||
it("fails if the shuttle ID doesn't exist", async () => {
|
||||
@@ -73,7 +73,8 @@ describe("MutationResolvers", () => {
|
||||
|
||||
assert(response.body.kind === "single");
|
||||
expect(response.body.singleResult.errors).toBeUndefined();
|
||||
expect(response.body.singleResult.data?.success).toBe(false);
|
||||
const notificationResponse = response.body.singleResult.data?.scheduleNotification as any;
|
||||
expect(notificationResponse.success).toBe(false);
|
||||
});
|
||||
|
||||
it("fails if the stop ID doesn't exist", async () => {
|
||||
|
||||
Reference in New Issue
Block a user