Skip to content

Fix unstopped strict mocks in GIDSignInTest. #410

Description

@brnnmrls

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions