mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-29 12:55:21 +01:00
fix tests
This commit is contained in:
parent
97a2d5b962
commit
b41248cece
@ -4,7 +4,11 @@ import { mock, MockProxy } from "jest-mock-extended";
|
||||
|
||||
import { EncryptionType } from "../../../enums";
|
||||
import { EncryptService } from "../../../platform/abstractions/encrypt.service";
|
||||
import { OrgKey, SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key";
|
||||
import {
|
||||
OrgKey,
|
||||
SymmetricCryptoKey,
|
||||
UserKey,
|
||||
} from "../../../platform/models/domain/symmetric-crypto-key";
|
||||
import { CryptoService } from "../../abstractions/crypto.service";
|
||||
import { ContainerService } from "../../services/container.service";
|
||||
|
||||
@ -241,7 +245,7 @@ describe("EncString", () => {
|
||||
});
|
||||
|
||||
it("gets the user's decryption key if required", async () => {
|
||||
const userKey = mock<SymmetricCryptoKey>();
|
||||
const userKey = mock<UserKey>();
|
||||
|
||||
cryptoService.getUserKeyWithLegacySupport.mockResolvedValue(userKey);
|
||||
|
||||
|
@ -4,7 +4,11 @@ import { makeStaticByteArray, mockEnc, mockFromJson } from "../../../../spec";
|
||||
import { CryptoService } from "../../../platform/abstractions/crypto.service";
|
||||
import { EncryptService } from "../../../platform/abstractions/encrypt.service";
|
||||
import { EncryptedString, EncString } from "../../../platform/models/domain/enc-string";
|
||||
import { OrgKey, SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key";
|
||||
import {
|
||||
OrgKey,
|
||||
SymmetricCryptoKey,
|
||||
UserKey,
|
||||
} from "../../../platform/models/domain/symmetric-crypto-key";
|
||||
import { ContainerService } from "../../../platform/services/container.service";
|
||||
import { AttachmentData } from "../../models/data/attachment.data";
|
||||
import { Attachment } from "../../models/domain/attachment";
|
||||
@ -120,7 +124,7 @@ describe("Attachment", () => {
|
||||
});
|
||||
|
||||
it("gets the user's decryption key if required", async () => {
|
||||
const userKey = mock<SymmetricCryptoKey>();
|
||||
const userKey = mock<UserKey>();
|
||||
cryptoService.getUserKeyWithLegacySupport.mockResolvedValue(userKey);
|
||||
|
||||
await attachment.decrypt(null, null);
|
||||
|
Loading…
Reference in New Issue
Block a user