mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add tests for isNotificationScheduled
This commit is contained in:
@@ -181,5 +181,18 @@ describe.each(repositoryImplementations)('$name', (holder) => {
|
|||||||
};
|
};
|
||||||
expect(mockCallback).toHaveBeenCalledWith(expectedEvent);
|
expect(mockCallback).toHaveBeenCalledWith(expectedEvent);
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
|
describe("isNotificationScheduled", () => {
|
||||||
|
it("returns true if the notification is in the repo", async () => {
|
||||||
|
await repo.addOrUpdateNotification(notification);
|
||||||
|
const result = await repo.isNotificationScheduled(notification);
|
||||||
|
expect(result).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("returns false if the notification isn't in the repo", async () => {
|
||||||
|
const result = await repo.isNotificationScheduled(notification);
|
||||||
|
expect(result).toBe(false);
|
||||||
|
})
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user