Skip to content

Commit

Permalink
Fix failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuki-YuXin committed Jan 3, 2025
1 parent bdbf233 commit dfb8f59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ class SSPRTest : NativeAuthPublicClientApplicationAbstractTest() {
*/
@Test
fun testErrorNoPasswordLinked() {
config = getConfig(defaultConfigType)
config = getConfig(ConfigType.SIGN_IN_OTP)
application = setupPCA(config, defaultChallengeTypes)

runBlocking {
val username = config.email
val result = application.resetPassword(username)
Assert.assertTrue(result is ResetPasswordError)
// Assert.assertTrue((result as ResetPasswordError).errorMessage!!.contains("The tenant or user does not support native credential recovery."))
Assert.assertTrue((result as ResetPasswordError).errorMessage!!.contains("The tenant or user does not support native credential recovery."))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ class SignInEmailOTPTest : NativeAuthPublicClientApplicationAbstractTest() {
runBlocking {
val user = config.email
val signInResult = application.signIn(user)
assertResult<SignInResult.PasswordRequired>(signInResult)
assertResult<SignInResult.CodeRequired>(signInResult)

val password = getSafePassword()
val passwordRequiredState = (signInResult as SignInResult.PasswordRequired).nextState
val submitPasswordResult = passwordRequiredState.submitPassword(password.toCharArray())
assertResult<SignInResult.CodeRequired>(submitPasswordResult)
assertResult<SignInResult.Complete>(submitPasswordResult)
}
}

Expand Down

0 comments on commit dfb8f59

Please sign in to comment.