mirror of
https://github.com/bitwarden/android.git
synced 2024-11-24 10:25:57 +03:00
Fix IllegalArgumentException in test (#3799)
This commit is contained in:
parent
17fd3ec0f0
commit
3b3b9ef33b
1 changed files with 9 additions and 14 deletions
|
@ -4210,29 +4210,24 @@ class VaultRepositoryTest {
|
|||
val userId = "userId"
|
||||
val fido2CredentialStore: Fido2CredentialStore = mockk()
|
||||
val relyingPartyId = "relyingPartyId"
|
||||
val expected: Result<List<Fido2CredentialAutofillView>> = mockk()
|
||||
val expected: List<Fido2CredentialAutofillView> = mockk()
|
||||
coEvery {
|
||||
vaultSdkSource.silentlyDiscoverCredentials(
|
||||
userId = userId,
|
||||
fido2CredentialStore = fido2CredentialStore,
|
||||
relyingPartyId = relyingPartyId,
|
||||
)
|
||||
} returns expected
|
||||
} returns expected.asSuccess()
|
||||
|
||||
turbineScope {
|
||||
val result = vaultRepository.silentlyDiscoverCredentials(
|
||||
userId = userId,
|
||||
fido2CredentialStore = fido2CredentialStore,
|
||||
relyingPartyId = relyingPartyId,
|
||||
)
|
||||
|
||||
assertEquals(
|
||||
expected,
|
||||
result,
|
||||
)
|
||||
}
|
||||
assertEquals(expected.asSuccess(), result)
|
||||
|
||||
coVerify {
|
||||
coVerify(exactly = 1) {
|
||||
vaultSdkSource.silentlyDiscoverCredentials(
|
||||
userId = userId,
|
||||
fido2CredentialStore = fido2CredentialStore,
|
||||
|
|
Loading…
Reference in a new issue