feat: add admin user frontend contract

This commit is contained in:
Bastian Wagner
2026-08-01 09:17:57 +02:00
parent 78761b570b
commit 484c7473fb
20 changed files with 378 additions and 21 deletions

View File

@@ -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('/');