@@ -378,39 +378,6 @@ - (void)tearDown {
378
378
379
379
#pragma mark - Server API Tests
380
380
381
- /* * @fn testFetchProvidersForEmailSuccess
382
- @brief Tests the flow of a successful @c fetchProvidersForEmail:completion: call.
383
- */
384
- - (void )testFetchProvidersForEmailSuccess {
385
- NSArray <NSString *> *allProviders = @[ FIRGoogleAuthProviderID, FIREmailAuthProviderID ];
386
- OCMExpect ([_mockBackend createAuthURI: [OCMArg any ] callback: [OCMArg any ]])
387
- .andCallBlock2 (
388
- ^(FIRCreateAuthURIRequest *_Nullable request, FIRCreateAuthURIResponseCallback callback) {
389
- XCTAssertEqualObjects (request.identifier , kEmail );
390
- XCTAssertNotNil (request.endpoint );
391
- XCTAssertEqualObjects (request.APIKey , kAPIKey );
392
- dispatch_async (FIRAuthGlobalWorkQueue (), ^() {
393
- id mockCreateAuthURIResponse = OCMClassMock ([FIRCreateAuthURIResponse class ]);
394
- OCMStub ([mockCreateAuthURIResponse allProviders ]).andReturn (allProviders);
395
- callback (mockCreateAuthURIResponse, nil );
396
- });
397
- });
398
- XCTestExpectation *expectation = [self expectationWithDescription: @" callback" ];
399
- #pragma clang diagnostic push
400
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
401
- [[FIRAuth auth ]
402
- fetchProvidersForEmail: kEmail
403
- completion: ^(NSArray <NSString *> *_Nullable providers, NSError *_Nullable error) {
404
- #pragma clang diagnostic pop
405
- XCTAssertTrue ([NSThread isMainThread ]);
406
- XCTAssertEqualObjects (providers, allProviders);
407
- XCTAssertNil (error);
408
- [expectation fulfill ];
409
- }];
410
- [self waitForExpectationsWithTimeout: kExpectationTimeout handler: nil ];
411
- OCMVerifyAll (_mockBackend);
412
- }
413
-
414
381
/* * @fn testFetchSignInMethodsForEmailSuccess
415
382
@brief Tests the flow of a successful @c fetchSignInMethodsForEmail:completion: call.
416
383
*/
@@ -443,30 +410,6 @@ - (void)testFetchSignInMethodsForEmailSuccess {
443
410
OCMVerifyAll (_mockBackend);
444
411
}
445
412
446
- /* * @fn testFetchProvidersForEmailFailure
447
- @brief Tests the flow of a failed @c fetchProvidersForEmail:completion: call.
448
- */
449
- - (void )testFetchProvidersForEmailFailure {
450
- OCMExpect ([_mockBackend createAuthURI: [OCMArg any ] callback: [OCMArg any ]])
451
- .andDispatchError2 ([FIRAuthErrorUtils tooManyRequestsErrorWithMessage: nil ]);
452
- XCTestExpectation *expectation = [self expectationWithDescription: @" callback" ];
453
- #pragma clang diagnostic push
454
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
455
- [[FIRAuth auth ]
456
- fetchProvidersForEmail: kEmail
457
- completion: ^(NSArray <NSString *> *_Nullable providers, NSError *_Nullable error) {
458
-
459
- #pragma clang pop
460
- XCTAssertTrue ([NSThread isMainThread ]);
461
- XCTAssertNil (providers);
462
- XCTAssertEqual (error.code , FIRAuthErrorCodeTooManyRequests);
463
- XCTAssertNotNil (error.userInfo [NSLocalizedDescriptionKey ]);
464
- [expectation fulfill ];
465
- }];
466
- [self waitForExpectationsWithTimeout: kExpectationTimeout handler: nil ];
467
- OCMVerifyAll (_mockBackend);
468
- }
469
-
470
413
/* * @fn testFetchSignInMethodsForEmailFailure
471
414
@brief Tests the flow of a failed @c fetchSignInMethodsForEmail:completion: call.
472
415
*/
@@ -1363,11 +1306,11 @@ - (void)testSignInWithOAuthCredentialSuccess {
1363
1306
}
1364
1307
#endif // TARGET_OS_IOS
1365
1308
1366
- /* * @fn testSignInAndRetrieveDataWithCredentialSuccess
1367
- @brief Tests the flow of a successful @c signInAndRetrieveDataWithCredential :completion: call
1309
+ /* * @fn testSignInWithCredentialSuccess
1310
+ @brief Tests the flow of a successful @c signInWithCredential :completion: call
1368
1311
with an Google Sign-In credential.
1369
1312
*/
1370
- - (void )testSignInAndRetrieveDataWithCredentialSuccess {
1313
+ - (void )testSignInWithCredentialSuccess {
1371
1314
OCMExpect ([_mockBackend verifyAssertion: [OCMArg any ] callback: [OCMArg any ]])
1372
1315
.andCallBlock2 (^(FIRVerifyAssertionRequest *_Nullable request,
1373
1316
FIRVerifyAssertionResponseCallback callback) {
0 commit comments