mirror of
https://github.com/bitwarden/browser
synced 2025-12-28 22:23:28 +00:00
[EC-499] Add encryptService to domain model decryption (#3385)
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Substitute, { Arg, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||
|
||||
import { AbstractEncryptService } from "@bitwarden/common/abstractions/abstractEncrypt.service";
|
||||
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
|
||||
import { SendType } from "@bitwarden/common/enums/sendType";
|
||||
import { SendData } from "@bitwarden/common/models/data/sendData";
|
||||
@@ -110,7 +111,9 @@ describe("Send", () => {
|
||||
cryptoService.decryptToBytes(send.key, null).resolves(makeStaticByteArray(32));
|
||||
cryptoService.makeSendKey(Arg.any()).resolves("cryptoKey" as any);
|
||||
|
||||
(window as any).bitwardenContainerService = new ContainerService(cryptoService);
|
||||
const encryptService = Substitute.for<AbstractEncryptService>();
|
||||
|
||||
(window as any).bitwardenContainerService = new ContainerService(cryptoService, encryptService);
|
||||
|
||||
const view = await send.decrypt();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user