feat: add admin user frontend contract
This commit is contained in:
@@ -28,6 +28,17 @@ describe('app routing', () => {
|
||||
expect(router.url).toBe('/auth/login');
|
||||
});
|
||||
|
||||
it('redirects the protected users route to login when logged out', async () => {
|
||||
await router.navigateByUrl('/users');
|
||||
expect(router.url).toBe('/auth/login');
|
||||
});
|
||||
|
||||
it('allows an authenticated user to open the users route', async () => {
|
||||
authStore.setSession('token', { id: 1, email: 'a@b.de', firstName: 'A', lastName: 'B' });
|
||||
await router.navigateByUrl('/users');
|
||||
expect(router.url).toBe('/users');
|
||||
});
|
||||
|
||||
it('redirects the root path to team-select when logged in', async () => {
|
||||
authStore.setSession('token', { id: 1, email: 'a@b.de', firstName: 'A', lastName: 'B' });
|
||||
await router.navigateByUrl('/');
|
||||
|
||||
Reference in New Issue
Block a user