1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

[PM-8865] Reset "should trust device" state to null (#9639)

This commit is contained in:
Todd Martin 2024-06-17 12:28:35 -04:00 committed by GitHub
parent ce88038c0d
commit 92f71e4f83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ export class DeviceTrustService implements DeviceTrustServiceAbstraction {
if (shouldTrustDevice) {
await this.trustDevice(userId);
// reset the trust choice
await this.setShouldTrustDevice(userId, false);
await this.setShouldTrustDevice(userId, null);
}
}

View File

@ -115,7 +115,7 @@ describe("deviceTrustService", () => {
expect(deviceTrustService.getShouldTrustDevice).toHaveBeenCalledTimes(1);
expect(deviceTrustService.trustDevice).toHaveBeenCalledTimes(1);
expect(deviceTrustService.setShouldTrustDevice).toHaveBeenCalledWith(mockUserId, false);
expect(deviceTrustService.setShouldTrustDevice).toHaveBeenCalledWith(mockUserId, null);
});
it("should not trust device nor reset when getShouldTrustDevice returns false", async () => {