Skip to content

Commit

Permalink
test: test if username login works
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Aaqil <[email protected]>
  • Loading branch information
aaqilniz committed Aug 23, 2024
1 parent bdda3ca commit 381295f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ describe('jwt authentication', () => {
token = res.body.token;
});

it(`user login successfully with username and password`, async () => {
const credentials = {username: 'Jane', password: 'opensesame'};
const res = await client.post('/users/login').send(credentials).expect(200);
token = res.body.token;
});

it('whoAmI returns the login user id', async () => {
const res = await client
.get('/whoAmI')
Expand Down

0 comments on commit 381295f

Please sign in to comment.