From 075dc02d79933acf40a05a0364b899b57a3a326d Mon Sep 17 00:00:00 2001 From: dmaclach Date: Mon, 20 Mar 2023 15:18:19 -0700 Subject: [PATCH] Fix up "double" stub OCMock silently ignores multiple equivalent stubs. The user was being stubbed twice for alloc. Change it to "expect" which expresses what is actually being tested for. --- GoogleSignIn/Tests/Unit/GIDSignInTest.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GoogleSignIn/Tests/Unit/GIDSignInTest.m b/GoogleSignIn/Tests/Unit/GIDSignInTest.m index 7a81ede6..d03018bc 100644 --- a/GoogleSignIn/Tests/Unit/GIDSignInTest.m +++ b/GoogleSignIn/Tests/Unit/GIDSignInTest.m @@ -1378,7 +1378,7 @@ - (void)OAuthLoginWithAddScopesFlow:(BOOL)addScopesFlow authorizationResponse:SAVE_TO_ARG_BLOCK(updatedAuthorizationResponse) profileData:SAVE_TO_ARG_BLOCK(profileData)]; } else { - [[[_user stub] andReturn:_user] alloc]; + [[[_user expect] andReturn:_user] alloc]; (void)[[[_user expect] andReturn:_user] initWithAuthState:SAVE_TO_ARG_BLOCK(authState) profileData:SAVE_TO_ARG_BLOCK(profileData)]; }