Skip to content

Commit ea122b7

Browse files
committed
Fix test:
1 parent 64f5bcf commit ea122b7

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

FirebaseAuth/Tests/Unit/PhoneAuthProviderTests.swift

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@
102102
@brief Tests a successful invocation of @c verifyPhoneNumber with recaptcha enterprise enforced
103103
*/
104104
func testVerifyPhoneNumberWithRceEnforceSuccess() async throws {
105-
initApp(#function, mockRecaptchaVerifier: FakeAuthRecaptchaVerifier(captchaResponse: kCaptchaResponse))
105+
initApp(
106+
#function,
107+
mockRecaptchaVerifier: FakeAuthRecaptchaVerifier(captchaResponse: kCaptchaResponse)
108+
)
106109
let auth = try XCTUnwrap(PhoneAuthProviderTests.auth)
107110
// TODO: Figure out how to mock objective C's FIRRecaptchaGetToken response
108111
let provider = PhoneAuthProvider.provider(auth: auth)
@@ -205,7 +208,10 @@
205208
/// @brief Tests a successful invocation of @c verifyPhoneNumber with recaptcha enterprise in
206209
/// audit mode
207210
func testVerifyPhoneNumberWithRceAuditSuccess() async throws {
208-
initApp(#function, mockRecaptchaVerifier: FakeAuthRecaptchaVerifier(captchaResponse: kCaptchaResponse))
211+
initApp(
212+
#function,
213+
mockRecaptchaVerifier: FakeAuthRecaptchaVerifier(captchaResponse: kCaptchaResponse)
214+
)
209215
let auth = try XCTUnwrap(PhoneAuthProviderTests.auth)
210216
let provider = PhoneAuthProvider.provider(auth: auth)
211217
rpcIssuer.rceMode = "AUDIT"
@@ -857,7 +863,11 @@
857863
.replacingOccurrences(of: ")", with: "")
858864
FirebaseApp.configure(name: strippedName, options: options)
859865
let auth = if let mockRecaptchaVerifier {
860-
Auth(app: FirebaseApp.app(name: strippedName)!, backend: authBackend)
866+
Auth(
867+
app: FirebaseApp.app(name: strippedName)!,
868+
backend: authBackend,
869+
recaptchaVerifier: mockRecaptchaVerifier
870+
)
861871
} else {
862872
Auth(app: FirebaseApp.app(name: strippedName)!, backend: authBackend)
863873
}

0 commit comments

Comments
 (0)