From 04fe9330d45e97a4ec470abaf088245657ee1840 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 23 Apr 2024 08:03:09 +0200 Subject: [PATCH] fix: #7190 tests --- .../__tests__/composables/useSession.spec.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/vitest/__tests__/composables/useSession.spec.js b/test/vitest/__tests__/composables/useSession.spec.js index f9f3dcb80..8feb5e571 100644 --- a/test/vitest/__tests__/composables/useSession.spec.js +++ b/test/vitest/__tests__/composables/useSession.spec.js @@ -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');