diff --git a/test/notifications/senders/AppleNotificationSenderTests.test.ts b/test/notifications/senders/AppleNotificationSenderTests.test.ts index aed404d..9cbc0cb 100644 --- a/test/notifications/senders/AppleNotificationSenderTests.test.ts +++ b/test/notifications/senders/AppleNotificationSenderTests.test.ts @@ -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 () => {