Skip to content

Commit

Permalink
n70: test: redirecting JEST -> CYPRESS
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-kiliushin committed Oct 23, 2022
1 parent b7f7c78 commit 2711418
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 28 deletions.
15 changes: 15 additions & 0 deletions cypress/e2e/redirect-unauthorized-users.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { testUsers } from "#utils/testing/test-users"

describe("redirect unauthorized users", () => {
it("unauthorized users are redirected to /auth.", () => {
cy.visit("/boards")
cy.url().should("include", "/auth")
})

it("authorized users are NOT redirected to /auth.", () => {
cy.authorize(testUsers.johnDoe.id)
cy.visit("/boards")
cy.wait(500)
cy.url().should("include", "/boards")
})
})
28 changes: 0 additions & 28 deletions src/views/index.test.tsx

This file was deleted.

0 comments on commit 2711418

Please sign in to comment.