Skip to content

Commit b458dc1

Browse files
authored
fix typo in tests (#8604)
1 parent 52ccaba commit b458dc1

File tree

3 files changed

+73
-73
lines changed

3 files changed

+73
-73
lines changed

FirebaseAuth/Tests/Unit/FIRAdditionalUserInfoTests.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ - (void)testAditionalUserInfoCreation {
7878
@c userInfoWithVerifyAssertionResponse call.
7979
*/
8080
- (void)testAditionalUserInfoCreationWithStaticInitializer {
81-
id mockVeriyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
82-
OCMExpect([mockVeriyAssertionResponse providerID]).andReturn(kProviderID);
83-
OCMExpect([mockVeriyAssertionResponse profile]).andReturn([[self class] profile]);
84-
OCMExpect([mockVeriyAssertionResponse username]).andReturn(kUserName);
85-
OCMExpect([mockVeriyAssertionResponse isNewUser]).andReturn(kIsNewUser);
81+
id mockVerifyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
82+
OCMExpect([mockVerifyAssertionResponse providerID]).andReturn(kProviderID);
83+
OCMExpect([mockVerifyAssertionResponse profile]).andReturn([[self class] profile]);
84+
OCMExpect([mockVerifyAssertionResponse username]).andReturn(kUserName);
85+
OCMExpect([mockVerifyAssertionResponse isNewUser]).andReturn(kIsNewUser);
8686

8787
FIRAdditionalUserInfo *userInfo =
88-
[FIRAdditionalUserInfo userInfoWithVerifyAssertionResponse:mockVeriyAssertionResponse];
88+
[FIRAdditionalUserInfo userInfoWithVerifyAssertionResponse:mockVerifyAssertionResponse];
8989
XCTAssertEqualObjects(userInfo.providerID, kProviderID);
9090
XCTAssertEqualObjects(userInfo.profile, [[self class] profile]);
9191
XCTAssertEqualObjects(userInfo.username, kUserName);
9292
XCTAssertEqual(userInfo.isNewUser, kIsNewUser);
93-
OCMVerifyAll(mockVeriyAssertionResponse);
93+
OCMVerifyAll(mockVerifyAssertionResponse);
9494
}
9595

9696
/** @fn testAdditionalUserInfoCoding

FirebaseAuth/Tests/Unit/FIRAuthTests.m

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,9 +1002,9 @@ - (void)testSignInWithEmailCredentialSuccess {
10021002
XCTAssertEqualObjects(request.password, kFakePassword);
10031003
XCTAssertTrue(request.returnSecureToken);
10041004
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
1005-
id mockVeriyPasswordResponse = OCMClassMock([FIRVerifyPasswordResponse class]);
1006-
[self stubTokensWithMockResponse:mockVeriyPasswordResponse];
1007-
callback(mockVeriyPasswordResponse, nil);
1005+
id mockVerifyPasswordResponse = OCMClassMock([FIRVerifyPasswordResponse class]);
1006+
[self stubTokensWithMockResponse:mockVerifyPasswordResponse];
1007+
callback(mockVerifyPasswordResponse, nil);
10081008
});
10091009
});
10101010
[self expectGetAccountInfo];
@@ -1171,11 +1171,11 @@ - (void)testSignInWithGoogleAccountExistsError {
11711171
XCTAssertEqualObjects(request.providerAccessToken, kGoogleAccessToken);
11721172
XCTAssertTrue(request.returnSecureToken);
11731173
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
1174-
id mockVeriyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
1175-
OCMStub([mockVeriyAssertionResponse needConfirmation]).andReturn(YES);
1176-
OCMStub([mockVeriyAssertionResponse email]).andReturn(kEmail);
1177-
[self stubTokensWithMockResponse:mockVeriyAssertionResponse];
1178-
callback(mockVeriyAssertionResponse, nil);
1174+
id mockVerifyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
1175+
OCMStub([mockVerifyAssertionResponse needConfirmation]).andReturn(YES);
1176+
OCMStub([mockVerifyAssertionResponse email]).andReturn(kEmail);
1177+
[self stubTokensWithMockResponse:mockVerifyAssertionResponse];
1178+
callback(mockVerifyAssertionResponse, nil);
11791179
});
11801180
});
11811181
XCTestExpectation *expectation = [self expectationWithDescription:@"callback"];
@@ -1208,13 +1208,13 @@ - (void)testSignInWithGoogleCredentialSuccess {
12081208
XCTAssertEqualObjects(request.providerAccessToken, kGoogleAccessToken);
12091209
XCTAssertTrue(request.returnSecureToken);
12101210
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
1211-
id mockVeriyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
1212-
OCMStub([mockVeriyAssertionResponse federatedID]).andReturn(kGoogleID);
1213-
OCMStub([mockVeriyAssertionResponse providerID]).andReturn(FIRGoogleAuthProviderID);
1214-
OCMStub([mockVeriyAssertionResponse localID]).andReturn(kLocalID);
1215-
OCMStub([mockVeriyAssertionResponse displayName]).andReturn(kGoogleDisplayName);
1216-
[self stubTokensWithMockResponse:mockVeriyAssertionResponse];
1217-
callback(mockVeriyAssertionResponse, nil);
1211+
id mockVerifyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
1212+
OCMStub([mockVerifyAssertionResponse federatedID]).andReturn(kGoogleID);
1213+
OCMStub([mockVerifyAssertionResponse providerID]).andReturn(FIRGoogleAuthProviderID);
1214+
OCMStub([mockVerifyAssertionResponse localID]).andReturn(kLocalID);
1215+
OCMStub([mockVerifyAssertionResponse displayName]).andReturn(kGoogleDisplayName);
1216+
[self stubTokensWithMockResponse:mockVerifyAssertionResponse];
1217+
callback(mockVerifyAssertionResponse, nil);
12181218
});
12191219
});
12201220
[self expectGetAccountInfoGoogle];
@@ -1249,13 +1249,13 @@ - (void)testSignInWithOAuthCredentialSuccess {
12491249
XCTAssertEqualObjects(request.sessionID, kOAuthSessionID);
12501250
XCTAssertTrue(request.returnSecureToken);
12511251
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
1252-
id mockVeriyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
1253-
OCMStub([mockVeriyAssertionResponse federatedID]).andReturn(kGoogleID);
1254-
OCMStub([mockVeriyAssertionResponse providerID]).andReturn(FIRGoogleAuthProviderID);
1255-
OCMStub([mockVeriyAssertionResponse localID]).andReturn(kLocalID);
1256-
OCMStub([mockVeriyAssertionResponse displayName]).andReturn(kGoogleDisplayName);
1257-
[self stubTokensWithMockResponse:mockVeriyAssertionResponse];
1258-
callback(mockVeriyAssertionResponse, nil);
1252+
id mockVerifyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
1253+
OCMStub([mockVerifyAssertionResponse federatedID]).andReturn(kGoogleID);
1254+
OCMStub([mockVerifyAssertionResponse providerID]).andReturn(FIRGoogleAuthProviderID);
1255+
OCMStub([mockVerifyAssertionResponse localID]).andReturn(kLocalID);
1256+
OCMStub([mockVerifyAssertionResponse displayName]).andReturn(kGoogleDisplayName);
1257+
[self stubTokensWithMockResponse:mockVerifyAssertionResponse];
1258+
callback(mockVerifyAssertionResponse, nil);
12591259
});
12601260
});
12611261
[self expectGetAccountInfoGoogle];
@@ -1310,15 +1310,15 @@ - (void)testSignInWithCredentialSuccess {
13101310
XCTAssertEqualObjects(request.providerAccessToken, kGoogleAccessToken);
13111311
XCTAssertTrue(request.returnSecureToken);
13121312
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
1313-
id mockVeriyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
1314-
OCMStub([mockVeriyAssertionResponse federatedID]).andReturn(kGoogleID);
1315-
OCMStub([mockVeriyAssertionResponse providerID]).andReturn(FIRGoogleAuthProviderID);
1316-
OCMStub([mockVeriyAssertionResponse localID]).andReturn(kLocalID);
1317-
OCMStub([mockVeriyAssertionResponse displayName]).andReturn(kGoogleDisplayName);
1318-
OCMStub([mockVeriyAssertionResponse profile]).andReturn([[self class] googleProfile]);
1319-
OCMStub([mockVeriyAssertionResponse username]).andReturn(kDisplayName);
1320-
[self stubTokensWithMockResponse:mockVeriyAssertionResponse];
1321-
callback(mockVeriyAssertionResponse, nil);
1313+
id mockVerifyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
1314+
OCMStub([mockVerifyAssertionResponse federatedID]).andReturn(kGoogleID);
1315+
OCMStub([mockVerifyAssertionResponse providerID]).andReturn(FIRGoogleAuthProviderID);
1316+
OCMStub([mockVerifyAssertionResponse localID]).andReturn(kLocalID);
1317+
OCMStub([mockVerifyAssertionResponse displayName]).andReturn(kGoogleDisplayName);
1318+
OCMStub([mockVerifyAssertionResponse profile]).andReturn([[self class] googleProfile]);
1319+
OCMStub([mockVerifyAssertionResponse username]).andReturn(kDisplayName);
1320+
[self stubTokensWithMockResponse:mockVerifyAssertionResponse];
1321+
callback(mockVerifyAssertionResponse, nil);
13221322
});
13231323
});
13241324
[self expectGetAccountInfoGoogle];
@@ -1492,9 +1492,9 @@ - (void)testSignInWithCustomTokenSuccess {
14921492
XCTAssertEqualObjects(request.token, kCustomToken);
14931493
XCTAssertTrue(request.returnSecureToken);
14941494
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
1495-
id mockVeriyCustomTokenResponse = OCMClassMock([FIRVerifyCustomTokenResponse class]);
1496-
[self stubTokensWithMockResponse:mockVeriyCustomTokenResponse];
1497-
callback(mockVeriyCustomTokenResponse, nil);
1495+
id mockVerifyCustomTokenResponse = OCMClassMock([FIRVerifyCustomTokenResponse class]);
1496+
[self stubTokensWithMockResponse:mockVerifyCustomTokenResponse];
1497+
callback(mockVerifyCustomTokenResponse, nil);
14981498
});
14991499
});
15001500
[self expectGetAccountInfo];
@@ -1546,9 +1546,9 @@ - (void)testSignInAndRetrieveDataWithCustomTokenSuccess {
15461546
XCTAssertEqualObjects(request.token, kCustomToken);
15471547
XCTAssertTrue(request.returnSecureToken);
15481548
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
1549-
id mockVeriyCustomTokenResponse = OCMClassMock([FIRVerifyCustomTokenResponse class]);
1550-
[self stubTokensWithMockResponse:mockVeriyCustomTokenResponse];
1551-
callback(mockVeriyCustomTokenResponse, nil);
1549+
id mockVerifyCustomTokenResponse = OCMClassMock([FIRVerifyCustomTokenResponse class]);
1550+
[self stubTokensWithMockResponse:mockVerifyCustomTokenResponse];
1551+
callback(mockVerifyCustomTokenResponse, nil);
15521552
});
15531553
});
15541554
[self expectGetAccountInfo];
@@ -2627,12 +2627,12 @@ - (void)waitForSignInWithAccessToken:(NSString *)accessToken
26272627
.andCallBlock2(^(FIRVerifyPasswordRequest *_Nullable request,
26282628
FIRVerifyPasswordResponseCallback callback) {
26292629
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
2630-
id mockVeriyPasswordResponse = OCMClassMock([FIRVerifyPasswordResponse class]);
2631-
OCMStub([mockVeriyPasswordResponse IDToken]).andReturn(accessToken);
2632-
OCMStub([mockVeriyPasswordResponse approximateExpirationDate])
2630+
id mockVerifyPasswordResponse = OCMClassMock([FIRVerifyPasswordResponse class]);
2631+
OCMStub([mockVerifyPasswordResponse IDToken]).andReturn(accessToken);
2632+
OCMStub([mockVerifyPasswordResponse approximateExpirationDate])
26332633
.andReturn([NSDate dateWithTimeIntervalSinceNow:kAccessTokenTimeToLive]);
2634-
OCMStub([mockVeriyPasswordResponse refreshToken]).andReturn(kRefreshToken);
2635-
callback(mockVeriyPasswordResponse, nil);
2634+
OCMStub([mockVerifyPasswordResponse refreshToken]).andReturn(kRefreshToken);
2635+
callback(mockVerifyPasswordResponse, nil);
26362636
});
26372637
});
26382638
[self expectGetAccountInfoWithAccessToken:accessToken];

FirebaseAuth/Tests/Unit/FIRUserTests.m

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,21 +1575,21 @@ - (void)testReauthenticateSuccess {
15751575
FIRVerifyPasswordRequest *_Nullable request,
15761576
FIRVerifyPasswordResponseCallback callback) {
15771577
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
1578-
id mockVeriyPasswordResponse = OCMClassMock(
1578+
id mockVerifyPasswordResponse = OCMClassMock(
15791579
[FIRVerifyPasswordResponse class]);
15801580
// New authentication comes back with new
15811581
// access token.
1582-
OCMStub([mockVeriyPasswordResponse IDToken])
1582+
OCMStub([mockVerifyPasswordResponse IDToken])
15831583
.andReturn(kNewAccessToken);
1584-
OCMStub([mockVeriyPasswordResponse
1584+
OCMStub([mockVerifyPasswordResponse
15851585
approximateExpirationDate])
15861586
.andReturn(
15871587
[NSDate dateWithTimeIntervalSinceNow:
15881588
kAccessTokenTimeToLive]);
15891589
OCMStub(
1590-
[mockVeriyPasswordResponse refreshToken])
1590+
[mockVerifyPasswordResponse refreshToken])
15911591
.andReturn(kRefreshToken);
1592-
callback(mockVeriyPasswordResponse, nil);
1592+
callback(mockVerifyPasswordResponse, nil);
15931593
});
15941594
});
15951595
OCMExpect([self->_mockBackend
@@ -1733,19 +1733,19 @@ - (void)testReauthenticateFailure {
17331733
FIRVerifyPasswordRequest *_Nullable request,
17341734
FIRVerifyPasswordResponseCallback callback) {
17351735
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
1736-
id mockVeriyPasswordResponse = OCMClassMock(
1736+
id mockVerifyPasswordResponse = OCMClassMock(
17371737
[FIRVerifyPasswordResponse class]);
1738-
OCMStub([mockVeriyPasswordResponse IDToken])
1738+
OCMStub([mockVerifyPasswordResponse IDToken])
17391739
.andReturn(kNewAccessToken);
1740-
OCMStub([mockVeriyPasswordResponse
1740+
OCMStub([mockVerifyPasswordResponse
17411741
approximateExpirationDate])
17421742
.andReturn(
17431743
[NSDate dateWithTimeIntervalSinceNow:
17441744
kAccessTokenTimeToLive]);
17451745
OCMStub(
1746-
[mockVeriyPasswordResponse refreshToken])
1746+
[mockVerifyPasswordResponse refreshToken])
17471747
.andReturn(kRefreshToken);
1748-
callback(mockVeriyPasswordResponse, nil);
1748+
callback(mockVerifyPasswordResponse, nil);
17491749
});
17501750
});
17511751
OCMExpect([self->_mockBackend
@@ -2902,12 +2902,12 @@ - (void)signInWithEmailPasswordWithMockUserInfoResponse:(id)mockUserInfoResponse
29022902
.andCallBlock2(^(FIRVerifyPasswordRequest *_Nullable request,
29032903
FIRVerifyPasswordResponseCallback callback) {
29042904
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
2905-
id mockVeriyPasswordResponse = OCMClassMock([FIRVerifyPasswordResponse class]);
2906-
OCMStub([mockVeriyPasswordResponse IDToken]).andReturn(kAccessToken);
2907-
OCMStub([mockVeriyPasswordResponse approximateExpirationDate])
2905+
id mockVerifyPasswordResponse = OCMClassMock([FIRVerifyPasswordResponse class]);
2906+
OCMStub([mockVerifyPasswordResponse IDToken]).andReturn(kAccessToken);
2907+
OCMStub([mockVerifyPasswordResponse approximateExpirationDate])
29082908
.andReturn([NSDate dateWithTimeIntervalSinceNow:kAccessTokenTimeToLive]);
2909-
OCMStub([mockVeriyPasswordResponse refreshToken]).andReturn(kRefreshToken);
2910-
callback(mockVeriyPasswordResponse, nil);
2909+
OCMStub([mockVerifyPasswordResponse refreshToken]).andReturn(kRefreshToken);
2910+
callback(mockVerifyPasswordResponse, nil);
29112911
});
29122912
});
29132913
[self expectGetAccountInfoWithMockUserInfoResponse:mockUserInfoResponse];
@@ -3082,15 +3082,15 @@ - (void)expectVerifyAssertionRequest:(NSString *)providerId
30823082
XCTAssertEqualObjects(request.providerAccessToken, providerAccessToken);
30833083
XCTAssertTrue(request.returnSecureToken);
30843084
dispatch_async(FIRAuthGlobalWorkQueue(), ^() {
3085-
id mockVeriyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
3086-
OCMStub([mockVeriyAssertionResponse federatedID]).andReturn(federatedID);
3087-
OCMStub([mockVeriyAssertionResponse providerID]).andReturn(providerId);
3088-
OCMStub([mockVeriyAssertionResponse localID]).andReturn(kLocalID);
3089-
OCMStub([mockVeriyAssertionResponse displayName]).andReturn(displayName);
3090-
OCMStub([mockVeriyAssertionResponse profile]).andReturn(profile);
3091-
OCMStub([mockVeriyAssertionResponse username]).andReturn(kUserName);
3092-
[self stubTokensWithMockResponse:mockVeriyAssertionResponse];
3093-
callback(mockVeriyAssertionResponse, nil);
3085+
id mockVerifyAssertionResponse = OCMClassMock([FIRVerifyAssertionResponse class]);
3086+
OCMStub([mockVerifyAssertionResponse federatedID]).andReturn(federatedID);
3087+
OCMStub([mockVerifyAssertionResponse providerID]).andReturn(providerId);
3088+
OCMStub([mockVerifyAssertionResponse localID]).andReturn(kLocalID);
3089+
OCMStub([mockVerifyAssertionResponse displayName]).andReturn(displayName);
3090+
OCMStub([mockVerifyAssertionResponse profile]).andReturn(profile);
3091+
OCMStub([mockVerifyAssertionResponse username]).andReturn(kUserName);
3092+
[self stubTokensWithMockResponse:mockVerifyAssertionResponse];
3093+
callback(mockVerifyAssertionResponse, nil);
30943094
});
30953095
});
30963096
[self expectGetAccountInfo:providerId federatedID:federatedID displayName:displayName];

0 commit comments

Comments
 (0)