mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
[PM-8865] Reset "should trust device" state to null (#9639)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user