mirror of
https://github.com/bitwarden/jslib
synced 2026-01-03 17:13:14 +00:00
Add test for making new KeyPair for old account
This commit is contained in:
@@ -246,6 +246,21 @@ describe('Cipher Service', () => {
|
||||
keyConnectorService.received(1).getAndSetKey(keyConnectorUrl);
|
||||
});
|
||||
|
||||
it('logIn: makes new KeyPair for an old account', async () => {
|
||||
logInSetup();
|
||||
commonSetup();
|
||||
const tokenResponse = newTokenResponse();
|
||||
tokenResponse.privateKey = null;
|
||||
|
||||
tokenService.getTwoFactorToken(email).resolves(null);
|
||||
apiService.postIdentityToken(Arg.any()).resolves(tokenResponse);
|
||||
|
||||
const result = await authService.logIn(email, masterPassword);
|
||||
|
||||
commonSuccessAssertions();
|
||||
apiService.received(1).postAccountKeys(Arg.any());
|
||||
});
|
||||
|
||||
// it('login: new SSO user with Key Connector posts key to the server', async () => {
|
||||
// logInSetup();
|
||||
// commonSetup();
|
||||
|
||||
Reference in New Issue
Block a user