Skip to content

Commit

Permalink
Fix test:
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 committed Dec 10, 2024
1 parent 64f5bcf commit ea122b7
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions FirebaseAuth/Tests/Unit/PhoneAuthProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit ea122b7

Please sign in to comment.