mirror of
https://github.com/bitwarden/android.git
synced 2024-11-21 17:05:44 +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 userId = "userId"
|
||||||
val fido2CredentialStore: Fido2CredentialStore = mockk()
|
val fido2CredentialStore: Fido2CredentialStore = mockk()
|
||||||
val relyingPartyId = "relyingPartyId"
|
val relyingPartyId = "relyingPartyId"
|
||||||
val expected: Result<List<Fido2CredentialAutofillView>> = mockk()
|
val expected: List<Fido2CredentialAutofillView> = mockk()
|
||||||
coEvery {
|
coEvery {
|
||||||
vaultSdkSource.silentlyDiscoverCredentials(
|
vaultSdkSource.silentlyDiscoverCredentials(
|
||||||
userId = userId,
|
userId = userId,
|
||||||
fido2CredentialStore = fido2CredentialStore,
|
fido2CredentialStore = fido2CredentialStore,
|
||||||
relyingPartyId = relyingPartyId,
|
relyingPartyId = relyingPartyId,
|
||||||
)
|
)
|
||||||
} returns expected
|
} returns expected.asSuccess()
|
||||||
|
|
||||||
turbineScope {
|
val result = vaultRepository.silentlyDiscoverCredentials(
|
||||||
val result = vaultRepository.silentlyDiscoverCredentials(
|
userId = userId,
|
||||||
userId = userId,
|
fido2CredentialStore = fido2CredentialStore,
|
||||||
fido2CredentialStore = fido2CredentialStore,
|
relyingPartyId = relyingPartyId,
|
||||||
relyingPartyId = relyingPartyId,
|
)
|
||||||
)
|
|
||||||
|
|
||||||
assertEquals(
|
assertEquals(expected.asSuccess(), result)
|
||||||
expected,
|
|
||||||
result,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
coVerify {
|
coVerify(exactly = 1) {
|
||||||
vaultSdkSource.silentlyDiscoverCredentials(
|
vaultSdkSource.silentlyDiscoverCredentials(
|
||||||
userId = userId,
|
userId = userId,
|
||||||
fido2CredentialStore = fido2CredentialStore,
|
fido2CredentialStore = fido2CredentialStore,
|
||||||
|
|
Loading…
Reference in a new issue