From ea122b753dbecff2d3a3da03eddeecb58d3bbae9 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Tue, 10 Dec 2024 16:39:27 -0500 Subject: [PATCH] Fix test: --- .../Tests/Unit/PhoneAuthProviderTests.swift | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/FirebaseAuth/Tests/Unit/PhoneAuthProviderTests.swift b/FirebaseAuth/Tests/Unit/PhoneAuthProviderTests.swift index 1195c1eb850..6aba1435783 100644 --- a/FirebaseAuth/Tests/Unit/PhoneAuthProviderTests.swift +++ b/FirebaseAuth/Tests/Unit/PhoneAuthProviderTests.swift @@ -102,7 +102,10 @@ @brief Tests a successful invocation of @c verifyPhoneNumber with recaptcha enterprise enforced */ func testVerifyPhoneNumberWithRceEnforceSuccess() async throws { - initApp(#function, mockRecaptchaVerifier: FakeAuthRecaptchaVerifier(captchaResponse: kCaptchaResponse)) + initApp( + #function, + mockRecaptchaVerifier: FakeAuthRecaptchaVerifier(captchaResponse: kCaptchaResponse) + ) let auth = try XCTUnwrap(PhoneAuthProviderTests.auth) // TODO: Figure out how to mock objective C's FIRRecaptchaGetToken response let provider = PhoneAuthProvider.provider(auth: auth) @@ -205,7 +208,10 @@ /// @brief Tests a successful invocation of @c verifyPhoneNumber with recaptcha enterprise in /// audit mode func testVerifyPhoneNumberWithRceAuditSuccess() async throws { - initApp(#function, mockRecaptchaVerifier: FakeAuthRecaptchaVerifier(captchaResponse: kCaptchaResponse)) + initApp( + #function, + mockRecaptchaVerifier: FakeAuthRecaptchaVerifier(captchaResponse: kCaptchaResponse) + ) let auth = try XCTUnwrap(PhoneAuthProviderTests.auth) let provider = PhoneAuthProvider.provider(auth: auth) rpcIssuer.rceMode = "AUDIT" @@ -857,7 +863,11 @@ .replacingOccurrences(of: ")", with: "") FirebaseApp.configure(name: strippedName, options: options) let auth = if let mockRecaptchaVerifier { - Auth(app: FirebaseApp.app(name: strippedName)!, backend: authBackend) + Auth( + app: FirebaseApp.app(name: strippedName)!, + backend: authBackend, + recaptchaVerifier: mockRecaptchaVerifier + ) } else { Auth(app: FirebaseApp.app(name: strippedName)!, backend: authBackend) }