Fixed tests
This commit is contained in:
parent
de478f87fe
commit
f8229553ee
|
@ -187,16 +187,6 @@ describe("KeyRotationService", () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("uses legacy rotation if feature flag is off", async () => {
|
|
||||||
mockConfigService.getFeatureFlag.mockResolvedValueOnce(false);
|
|
||||||
|
|
||||||
await keyRotationService.rotateUserKeyAndEncryptedData("mockMasterPassword");
|
|
||||||
|
|
||||||
expect(mockApiService.postUserKeyUpdate).toHaveBeenCalled();
|
|
||||||
expect(mockEmergencyAccessService.postLegacyRotation).toHaveBeenCalled();
|
|
||||||
expect(mockResetPasswordService.postLegacyRotation).toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("throws if server rotation fails", async () => {
|
it("throws if server rotation fails", async () => {
|
||||||
mockApiService.postUserKeyUpdate.mockRejectedValueOnce(new Error("mockError"));
|
mockApiService.postUserKeyUpdate.mockRejectedValueOnce(new Error("mockError"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue