forked from verdnatura/salix-front
fix: #7190 tests
This commit is contained in:
parent
6018d51642
commit
04fe9330d4
|
@ -96,7 +96,11 @@ describe('session', () => {
|
|||
const expectedTokenMultimedia = 'mySessionTokenMultimedia';
|
||||
const keepLogin = false;
|
||||
|
||||
await session.login(expectedToken,expectedTokenMultimedia, keepLogin);
|
||||
await session.login({
|
||||
token: expectedToken,
|
||||
tokenMultimedia: expectedTokenMultimedia,
|
||||
keepLogin,
|
||||
});
|
||||
|
||||
const roles = state.getRoles();
|
||||
const localToken = localStorage.getItem('token');
|
||||
|
@ -106,7 +110,7 @@ describe('session', () => {
|
|||
expect(localToken).toBeNull();
|
||||
expect(sessionToken).toEqual(expectedToken);
|
||||
|
||||
await session.destroy(); // this clears token and user for any other test
|
||||
await session.destroy(); // this clears token and user for any other test
|
||||
});
|
||||
|
||||
it('should fetch the user roles and then set token in the localStorage', async () => {
|
||||
|
@ -119,7 +123,11 @@ describe('session', () => {
|
|||
const expectedTokenMultimedia = 'myLocalTokenMultimedia';
|
||||
const keepLogin = true;
|
||||
|
||||
await session.login(expectedToken, expectedTokenMultimedia, keepLogin);
|
||||
await session.login({
|
||||
token: expectedToken,
|
||||
tokenMultimedia: expectedTokenMultimedia,
|
||||
keepLogin,
|
||||
});
|
||||
|
||||
const roles = state.getRoles();
|
||||
const localToken = localStorage.getItem('token');
|
||||
|
|
Loading…
Reference in New Issue