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)
3131
3232@interface FIRMessagingTokenManager (ExposedForTest)
3333
34+ - (void )didDeleteFCMScopedTokensForCheckin : (FIRMessagingCheckinPreferences *)checkin ;
35+
3436- (void )resetCredentialsIfNeeded ;
3537
3638@end
@@ -151,6 +153,10 @@ - (void)testResetCredentialsWithFreshInstall {
151153 OCMStub ([_mockAuthService checkinPreferences ]).andReturn (checkinPreferences);
152154 // Plist file doesn't exist, meaning this is a fresh install.
153155 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 );
154160
155161 [_messaging.tokenManager resetCredentialsIfNeeded ];
156162 OCMVerifyAll (_mockCheckinStore);
You can’t perform that action at this time.
0 commit comments