Last active
July 24, 2023 00:59
-
-
Save cdmunoz/dec868274ebb9bfe7f133ea444c7d1ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group('with a success', () { | |
setUpAll(() async { | |
when(pushNotifier.requestPermissions()).thenSucceed(true); | |
when(pushNotifier.onTokenRefresh()).thenStream(fcmRefreshedToken); | |
await subject().onInit(); | |
}); | |
test('ask for push permissions', () { | |
verify(pushNotifier.requestPermissions()); | |
}); | |
test('obtained the push notification token', () { | |
verify(obtainPushNotificationToken.call()); | |
}); | |
test('refreshed the push notification token', () { | |
verify(refreshPushNotificationToken.call('fcm-refreshed-token')); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment