mirror of
https://github.com/bitwarden/jslib
synced 2025-12-13 14:53:23 +00:00
Update tests for new stateService interface
This commit is contained in:
@@ -16,7 +16,7 @@ import { AuthService } from "jslib-common/services/auth.service";
|
|||||||
|
|
||||||
import { Utils } from "jslib-common/misc/utils";
|
import { Utils } from "jslib-common/misc/utils";
|
||||||
|
|
||||||
import { AccountProfile, AccountTokens } from "jslib-common/models/domain/account";
|
import { Account, AccountProfile, AccountTokens } from "jslib-common/models/domain/account";
|
||||||
import { AuthResult } from "jslib-common/models/domain/authResult";
|
import { AuthResult } from "jslib-common/models/domain/authResult";
|
||||||
import { EncString } from "jslib-common/models/domain/encString";
|
import { EncString } from "jslib-common/models/domain/encString";
|
||||||
import { SymmetricCryptoKey } from "jslib-common/models/domain/symmetricCryptoKey";
|
import { SymmetricCryptoKey } from "jslib-common/models/domain/symmetricCryptoKey";
|
||||||
@@ -130,7 +130,8 @@ describe("Cipher Service", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function commonSuccessAssertions() {
|
function commonSuccessAssertions() {
|
||||||
stateService.received(1).addAccount({
|
stateService.received(1).addAccount(
|
||||||
|
new Account({
|
||||||
profile: {
|
profile: {
|
||||||
...new AccountProfile(),
|
...new AccountProfile(),
|
||||||
...{
|
...{
|
||||||
@@ -148,7 +149,8 @@ describe("Cipher Service", () => {
|
|||||||
refreshToken: refreshToken,
|
refreshToken: refreshToken,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
|
);
|
||||||
stateService.received(1).setBiometricLocked(false);
|
stateService.received(1).setBiometricLocked(false);
|
||||||
messagingService.received(1).send("loggedIn");
|
messagingService.received(1).send("loggedIn");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user