Skip to content

Commit

Permalink
Experimenting with sqlite datastore
Browse files Browse the repository at this point in the history
  • Loading branch information
jrsmth-tier2 committed May 3, 2024
1 parent e971e35 commit af29379
Show file tree
Hide file tree
Showing 14 changed files with 716 additions and 161 deletions.
11 changes: 6 additions & 5 deletions cypress/e2e/auth/route.spec.cy.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import "cypress-localstorage-commands"

describe('Protected Routes', () => {
const tokenUrl = 'http://localhost:8010/token';
const protect = '/fit-track';
const redirect = '/home';
const redirect = '/auth/login';
const unprotectedRoutes: string[] = [
"home",
"login",
"register"
"auth/login",
"auth/register"
];

beforeEach(() => {
Expand All @@ -33,7 +34,7 @@ describe('Protected Routes', () => {
/** When: */
cy.visit(protect);

/** Then: should be redirected to home page */
/** Then: should be redirected to login page */
cy.location('pathname').should('eq', redirect);
})

Expand All @@ -52,7 +53,7 @@ describe('Protected Routes', () => {
/** When: there is no token */
cy.visit(protect);

/** Then: should be redirected to home page */
/** Then: should be redirected to login page */
cy.location('pathname').should('eq', redirect);
})

Expand Down
Loading

0 comments on commit af29379

Please sign in to comment.