1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-10 13:40:06 +00:00

Fixed test

This commit is contained in:
gbubemismith
2025-04-09 17:53:45 -04:00
parent 5c89a47678
commit 6f3cbd1c62

View File

@@ -135,7 +135,7 @@ describe("DefaultCipherEncryptionService", () => {
mockSdkClient.vault().ciphers().decrypt.mockReturnValue(sdkCipherView);
jest.spyOn(CipherView, "fromSdkCipherView").mockReturnValue(expectedCipherView);
const result = await cipherEncryptionService.decrypt(userId, cipherObj);
const result = await cipherEncryptionService.decrypt(cipherObj, userId);
expect(result).toEqual(expectedCipherView);
expect(cipherObj.toSdkCipher).toHaveBeenCalledTimes(1);
@@ -200,7 +200,7 @@ describe("DefaultCipherEncryptionService", () => {
.spyOn(Fido2CredentialView, "fromSdkFido2CredentialView")
.mockReturnValueOnce(fido2CredentialView);
const result = await cipherEncryptionService.decrypt(userId, cipherObj);
const result = await cipherEncryptionService.decrypt(cipherObj, userId);
expect(result).toBe(expectedCipherView);
expect(result.login?.fido2Credentials).toEqual([fido2CredentialView]);
@@ -219,7 +219,7 @@ describe("DefaultCipherEncryptionService", () => {
throw new Error(errorMessage);
});
const result = await cipherEncryptionService.decrypt(userId, cipherObj);
const result = await cipherEncryptionService.decrypt(cipherObj, userId);
expect(result).toBeInstanceOf(CipherView);
expect(result.decryptionFailure).toBe(true);