Skip to content

Commit

Permalink
no
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Ziaei committed Mar 31, 2024
1 parent f61f0b5 commit 788921a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions apps/app/tests/e2e/smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ test.describe('POST /jokes', () => {
expect(await req.text()).toMatch(/unauthorized/i)
})

test('authenticated', async ({ request }) => {
const req = await request.post('/jokes', {
headers: { Authorization: process.env.AUTH_TOKEN },
})
expect(req.ok()).toBeTruthy()
expect(req.status()).toBe(200)
const response = await req.json()
expect(response).toHaveProperty('message')
})
// Can't do the authenticated test on GitHub Actions because IG detects the GitHub network as a bot
// test('authenticated', async ({ request }) => {
// const req = await request.post('/jokes', {
// headers: { Authorization: process.env.AUTH_TOKEN },
// })
// expect(req.ok()).toBeTruthy()
// expect(req.status()).toBe(200)
// const response = await req.json()
// expect(response).toHaveProperty('message')
// })
})

0 comments on commit 788921a

Please sign in to comment.