This commit is contained in:
parent
1627f9cd36
commit
c4f40fbb59
|
@ -23,9 +23,6 @@ describe('useRole', () => {
|
|||
name: `T'Challa`,
|
||||
nickname: 'Black Panther',
|
||||
lang: 'en',
|
||||
userConfig: {
|
||||
darkMode: false,
|
||||
},
|
||||
};
|
||||
const expectedUser = {
|
||||
id: 999,
|
||||
|
@ -35,8 +32,12 @@ describe('useRole', () => {
|
|||
darkMode: false,
|
||||
};
|
||||
const expectedRoles = ['salesPerson', 'admin'];
|
||||
vi.spyOn(axios, 'get').mockResolvedValue({
|
||||
vi.spyOn(axios, 'get')
|
||||
.mockResolvedValueOnce({
|
||||
data: { roles: rolesData, user: fetchedUser },
|
||||
})
|
||||
.mockResolvedValueOnce({
|
||||
data: { darkMode: false },
|
||||
});
|
||||
|
||||
vi.spyOn(role.state, 'setUser');
|
||||
|
|
Loading…
Reference in New Issue