mirror of
https://github.com/bitwarden/browser
synced 2026-01-31 08:43:54 +00:00
Fixed tests.
This commit is contained in:
@@ -27,6 +27,7 @@ describe("ExtensionLogoutService", () => {
|
||||
|
||||
messagingService = mock<MessagingService>();
|
||||
accountSwitcherService = mock<AccountSwitcherService>();
|
||||
logService = mock<LogService>();
|
||||
|
||||
logoutService = new ExtensionLogoutService(
|
||||
messagingService,
|
||||
|
||||
@@ -320,7 +320,7 @@ describe("LockComponent", () => {
|
||||
acceptButtonText: { key: "logOut" },
|
||||
type: "warning",
|
||||
});
|
||||
expect(mockLogoutService.logout).toHaveBeenCalledWith(userId);
|
||||
expect(mockLogoutService.logout).toHaveBeenCalledWith(userId, "userInitiated");
|
||||
expect(mockRouter.navigate).toHaveBeenCalledWith(["/"]);
|
||||
});
|
||||
|
||||
@@ -522,7 +522,7 @@ describe("LockComponent", () => {
|
||||
expect(mockLogService.warning).toHaveBeenCalledWith(
|
||||
"[LockComponent] User cannot unlock again. Logging out!",
|
||||
);
|
||||
expect(mockLogoutService.logout).toHaveBeenCalledWith(userId);
|
||||
expect(mockLogoutService.logout).toHaveBeenCalledWith(userId, "noUnlockOptionsAvailable");
|
||||
});
|
||||
|
||||
it("should not logout when master password is enabled", async () => {
|
||||
|
||||
Reference in New Issue
Block a user