Mock apnPushNotificationScheduler

This commit is contained in:
Katherine Yen 2023-04-17 10:55:15 -07:00 committed by GitHub
parent 350682b83a
commit c485d317fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -151,6 +151,8 @@ class PushNotificationManagerTest {
when(device.getApnId()).thenReturn(deviceToken);
when(apnSender.sendNotification(any()))
.thenReturn(CompletableFuture.completedFuture(new SendPushNotificationResult(true, null, false)));
when(apnPushNotificationScheduler.scheduleBackgroundNotification(account, device))
.thenReturn(CompletableFuture.completedFuture(null));
} else {
when(device.getGcmId()).thenReturn(deviceToken);
when(fcmSender.sendNotification(any()))