mirror of
https://github.com/bitwarden/android.git
synced 2025-02-23 00:59:16 +03:00
[PM-11649] Add missing test case
This commit is contained in:
parent
087e97335d
commit
2fd3db1804
1 changed files with 21 additions and 0 deletions
|
@ -6065,6 +6065,27 @@ class AuthRepositoryTest {
|
|||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `verifyEmailToken failure without message should return error`() = runTest {
|
||||
coEvery {
|
||||
identityService.verifyEmailToken(
|
||||
VerifyEmailTokenRequestJson(
|
||||
email = EMAIL,
|
||||
emailVerificationToken = EMAIL_VERIFICATION_TOKEN,
|
||||
),
|
||||
)
|
||||
} returns Throwable().asFailure()
|
||||
|
||||
val result = repository.verifyEmailToken(
|
||||
email = EMAIL,
|
||||
emailVerificationToken = EMAIL_VERIFICATION_TOKEN,
|
||||
)
|
||||
assertEquals(
|
||||
VerifyEmailTokenResult.Error,
|
||||
result,
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val UNIQUE_APP_ID = "testUniqueAppId"
|
||||
private const val NAME = "Example Name"
|
||||
|
|
Loading…
Add table
Reference in a new issue