File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
FirebaseMessaging/Tests/UnitTests Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ @interface FIRMessaging (ExposedForTest)
31
31
32
32
@interface FIRMessagingTokenManager (ExposedForTest)
33
33
34
+ - (void )didDeleteFCMScopedTokensForCheckin : (FIRMessagingCheckinPreferences *)checkin ;
35
+
34
36
- (void )resetCredentialsIfNeeded ;
35
37
36
38
@end
@@ -151,6 +153,10 @@ - (void)testResetCredentialsWithFreshInstall {
151
153
OCMStub ([_mockAuthService checkinPreferences ]).andReturn (checkinPreferences);
152
154
// Plist file doesn't exist, meaning this is a fresh install.
153
155
OCMStub ([_mockCheckinStore hasCheckinPlist ]).andReturn (NO );
156
+ // Expect reset operation but do nothing to avoid flakes due to delayed operation queue.
157
+ OCMExpect (
158
+ [_mockTokenManager didDeleteFCMScopedTokensForCheckin: [OCMArg isEqual: checkinPreferences]])
159
+ .andDo (nil );
154
160
155
161
[_messaging.tokenManager resetCredentialsIfNeeded ];
156
162
OCMVerifyAll (_mockCheckinStore);
You can’t perform that action at this time.
0 commit comments