google / google/GoogleSignIn-iOS

Fix unstopped strict mocks in GIDSignInTest.

Offen
#410 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @brnnmrls Auf GitHub ansehen
bug
Vorherrschende Sprache
Objective-C
Sterne
750
Forks
282
Ø Merge
2 T. 15 Std.
Gemergte PRs (30 T.)
9

Beschreibung

**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:

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.