[PM-8865] Reset "should trust device" state to null (#9639)
This commit is contained in:
parent
ce88038c0d
commit
92f71e4f83
|
@ -102,7 +102,7 @@ export class DeviceTrustService implements DeviceTrustServiceAbstraction {
|
||||||
if (shouldTrustDevice) {
|
if (shouldTrustDevice) {
|
||||||
await this.trustDevice(userId);
|
await this.trustDevice(userId);
|
||||||
// reset the trust choice
|
// 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.getShouldTrustDevice).toHaveBeenCalledTimes(1);
|
||||||
expect(deviceTrustService.trustDevice).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 () => {
|
it("should not trust device nor reset when getShouldTrustDevice returns false", async () => {
|
||||||
|
|
Loading…
Reference in New Issue