232201_dev_to_test #59

Merged
alexm merged 48 commits from dev into test 2023-06-01 07:18:41 +00:00
1 changed files with 5 additions and 4 deletions
Showing only changes of commit c4f40fbb59 - Show all commits

View File

@ -23,9 +23,6 @@ describe('useRole', () => {
name: `T'Challa`, name: `T'Challa`,
nickname: 'Black Panther', nickname: 'Black Panther',
lang: 'en', lang: 'en',
userConfig: {
darkMode: false,
},
}; };
const expectedUser = { const expectedUser = {
id: 999, id: 999,
@ -35,8 +32,12 @@ describe('useRole', () => {
darkMode: false, darkMode: false,
}; };
const expectedRoles = ['salesPerson', 'admin']; const expectedRoles = ['salesPerson', 'admin'];
vi.spyOn(axios, 'get').mockResolvedValue({ vi.spyOn(axios, 'get')
.mockResolvedValueOnce({
data: { roles: rolesData, user: fetchedUser }, data: { roles: rolesData, user: fetchedUser },
})
.mockResolvedValueOnce({
data: { darkMode: false },
}); });
vi.spyOn(role.state, 'setUser'); vi.spyOn(role.state, 'setUser');