Skip to content

Commit

Permalink
Fix refresh token test
Browse files Browse the repository at this point in the history
  • Loading branch information
hagopj13 committed Dec 4, 2019
1 parent b37497d commit fadffd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/auth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ describe('Auth routes', () => {
const dbRefreshTokenDoc = await Token.findOne({ token: res.body.refresh.token });
expect(dbRefreshTokenDoc).toMatchObject({ type: 'refresh', user: userOne._id, blacklisted: false });

const oldDbRefreshTokenDoc = await Token.findOne({ token: refreshToken });
expect(oldDbRefreshTokenDoc).toBeNull();
const dbRefreshTokenCount = await Token.countDocuments();
expect(dbRefreshTokenCount).toBe(1);
});

test('should return 400 error if refresh token is missing from request body', async () => {
Expand Down

0 comments on commit fadffd4

Please sign in to comment.