Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unstopped strict mocks in GIDSignInTest. #410

Open
brnnmrls opened this issue May 9, 2024 · 0 comments · Fixed by #401 or #426
Open

Fix unstopped strict mocks in GIDSignInTest. #410

brnnmrls opened this issue May 9, 2024 · 0 comments · Fixed by #401 or #426
Assignees
Labels
bug Something isn't working

Comments

@brnnmrls
Copy link
Member

brnnmrls commented May 9, 2024

Description
Strict mocks in GIDSignInTest 'carry forward' in subsequent tests using mocked objects, like OIDAuthState. If test receiving error is ran before GIDSignInTest, then the test succeeds.

To Reproduce
Steps to reproduce the behavior:

  1. In GIDSignInTest.m, change OCMClassMock to OCMStrictClassMock for OIDAuthState and GTMAuthSession.
  2. Run all tests under GSI Suite.

Expected behavior
Tests in GIDVerifyAccountDetailTest should not error due to OCClassMockObject(OIDAuthState): since no mocking is done in this file.

Error message
test failure link
OCClassMockObject(OIDAuthState): unexpected method invoked: initWithAuthorizationResponse:<OIDAuthorizationResponse:

Additional context
Issue was found in GIDVerifyAccountDetailTest whenever creating a test instance of OIDAuthState (PR). This issue was temporarily fixed to unblock tests by changing the strict mocks to be less restrictive.

@brnnmrls brnnmrls added the bug Something isn't working label May 9, 2024
@brnnmrls brnnmrls self-assigned this May 9, 2024
@brnnmrls brnnmrls linked a pull request Jun 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant