Skip to content

Commit

Permalink
Fix android unit tests on main (auth0#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
Widcket authored Apr 18, 2023
1 parent 883dc98 commit b5d5a4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,3 @@ fun AuthenticationException.toMap(): Map<String, Any> {
if (exception.getValue("mfa_token") != null) { put("mfa_token", exception.getValue("mfa_token")!!) }
}
}

val AuthenticationException.isTooManyAttempts: Boolean
get() = "too_many_attempts" == this.getCode()
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ class AuthenticationExceptionExtensionsTest {
)
},
"isTooManyAttempts" to { exception: AuthenticationException ->
doReturn("too_many_attempts").`when`(exception).getCode()
`when`(exception.isTooManyAttempts).thenReturn(
true
)
},
"isVerificationRequired" to { exception: AuthenticationException ->
`when`(exception.isVerificationRequired).thenReturn(
Expand Down

0 comments on commit b5d5a4f

Please sign in to comment.