Skip to content

Commit

Permalink
fix test with not valid token
Browse files Browse the repository at this point in the history
  • Loading branch information
Danspb77 committed Nov 2, 2023
1 parent b31848a commit 624748f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/presentation/http/router/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ describe('Auth API', () => {
describe('POST /auth', () => {
test('Returns 401 when session is not valid', async () => {
const expectedStatus = 401

const refreshToken = "not-validToken";
const response = await global.api?.fakeRequest({
method: 'POST',
url: '/auth', // write not authorized data
body: { token: refreshToken }
})

expect(response?.statusCode).toBe(expectedStatus)
Expand Down

0 comments on commit 624748f

Please sign in to comment.