mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add test for failing error code
This commit is contained in:
@@ -120,7 +120,17 @@ describe("AppleNotificationSender", () => {
|
||||
});
|
||||
|
||||
it('returns false if there is an error sending the notification', async () => {
|
||||
mockHttp2Connect(403);
|
||||
|
||||
const notificationArguments: NotificationAlertArguments = {
|
||||
title: 'Test notification',
|
||||
body: 'This notification will not send',
|
||||
}
|
||||
|
||||
const result = await notificationSender.sendNotificationImmediately('1', notificationArguments);
|
||||
|
||||
expect(http2.connect).toHaveBeenCalled();
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
|
||||
it('does not send notification if shouldActuallySendNotifications is false', async () => {
|
||||
|
||||
Reference in New Issue
Block a user