google / google/GoogleSignIn-iOS

Fix unstopped strict mocks in GIDSignInTest.

Open
#410 0 comments 0 reactions 1 assignee Claimed by @brnnmrls View on GitHub
bug
Dominant language
Objective-C
Stars
750
Forks
282
Avg merge
2d 15h
Merged PRs (30d)
9

Description

**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](https://github.com/google/GoogleSignIn-iOS/actions/runs/8994345490/job/24707662856#step:4:434)
` OCClassMockObject(OIDAuthState): unexpected method invoked: initWithAuthorizationResponse:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.