feat: allow bypass of reset-password and verify routes for logged-in users
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m27s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m27s
This commit is contained in:
@@ -78,6 +78,22 @@ describe('router auth guard', () => {
|
||||
expect(path).toBe('/child')
|
||||
})
|
||||
|
||||
it('allows logged-in parent user to access /auth/reset-password', async () => {
|
||||
isUserLoggedInMock.value = true
|
||||
isParentAuthenticatedMock.value = true
|
||||
|
||||
const path = await navigate('/auth/reset-password')
|
||||
expect(path).toBe('/auth/reset-password')
|
||||
})
|
||||
|
||||
it('allows logged-in child user to access /auth/reset-password', async () => {
|
||||
isUserLoggedInMock.value = true
|
||||
isParentAuthenticatedMock.value = false
|
||||
|
||||
const path = await navigate('/auth/reset-password')
|
||||
expect(path).toBe('/auth/reset-password')
|
||||
})
|
||||
|
||||
// ── Unauthenticated users may access /auth ────────────────────────────────
|
||||
|
||||
it('allows unauthenticated user to access /auth', async () => {
|
||||
|
||||
Reference in New Issue
Block a user