mirror of
https://github.com/bitwarden/android.git
synced 2026-11-19 17:40:12 -06:00
Update moveToOrganization to be 1-to-1 with the SDK (#1429)
This commit is contained in:
committed by
Álison Fernandes
parent
3a8f3aa0f6
commit
913b53bcac
+2
-3
@@ -855,12 +855,11 @@ class VaultSdkSourceTest {
|
||||
val userId = "userId"
|
||||
val organizationId = "organizationId"
|
||||
val mockCipher = mockk<CipherView>()
|
||||
val expectedResult = mockk<Cipher>()
|
||||
val expectedResult = mockk<CipherView>()
|
||||
val clientCipher = mockk<ClientCiphers> {
|
||||
coEvery {
|
||||
moveToOrganization(cipher = mockCipher, organizationId = organizationId)
|
||||
} returns mockCipher
|
||||
coEvery { encrypt(cipherView = mockCipher) } returns expectedResult
|
||||
} returns expectedResult
|
||||
}
|
||||
every { clientVault.ciphers() } returns clientCipher
|
||||
|
||||
|
||||
@@ -3112,12 +3112,16 @@ class VaultRepositoryTest {
|
||||
fakeAuthDiskSource.userState = MOCK_USER_STATE
|
||||
val userId = "mockId-1"
|
||||
val organizationId = "organizationId"
|
||||
val mockCipherView = createMockCipherView(number = 1)
|
||||
coEvery {
|
||||
vaultSdkSource.moveToOrganization(
|
||||
userId = userId,
|
||||
organizationId = organizationId,
|
||||
cipherView = createMockCipherView(number = 1),
|
||||
)
|
||||
} returns mockCipherView.asSuccess()
|
||||
coEvery {
|
||||
vaultSdkSource.encryptCipher(userId = userId, cipherView = mockCipherView)
|
||||
} returns createMockSdkCipher(number = 1, clock = clock).asSuccess()
|
||||
coEvery {
|
||||
ciphersService.shareCipher(
|
||||
@@ -3156,12 +3160,16 @@ class VaultRepositoryTest {
|
||||
fakeAuthDiskSource.userState = MOCK_USER_STATE
|
||||
val userId = "mockId-1"
|
||||
val organizationId = "organizationId"
|
||||
val mockCipherView = createMockCipherView(number = 1)
|
||||
coEvery {
|
||||
vaultSdkSource.moveToOrganization(
|
||||
userId = userId,
|
||||
organizationId = organizationId,
|
||||
cipherView = createMockCipherView(number = 1),
|
||||
)
|
||||
} returns mockCipherView.asSuccess()
|
||||
coEvery {
|
||||
vaultSdkSource.encryptCipher(userId = userId, cipherView = mockCipherView)
|
||||
} returns createMockSdkCipher(number = 1, clock = clock).asSuccess()
|
||||
coEvery {
|
||||
ciphersService.shareCipher(
|
||||
|
||||
Reference in New Issue
Block a user