Skip to content

Commit

Permalink
tests(local-scheme-token): add tests to check if Authorization Header…
Browse files Browse the repository at this point in the history
… is a valid Bearer format
  • Loading branch information
breakingrobot committed Apr 3, 2018
1 parent c64e7f1 commit 6cd2ab5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/module.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ describe('auth', () => {
})

expect(axiosBearer).toBeDefined()
expect(axiosBearer.split(' ')).toHaveLength(2)
expect(axiosBearer.split(' ')[0]).toMatch(/^Bearer$/i)
expect(token).toBeDefined()
expect(user).toBeDefined()
expect(user.username).toBe('test_username')
Expand Down

0 comments on commit 6cd2ab5

Please sign in to comment.