Skip to content

Commit

Permalink
bg(helper): fix token helper spelling error [finishes #168424701]
Browse files Browse the repository at this point in the history
  • Loading branch information
femitj committed Sep 11, 2019
1 parent 9e89d2b commit 1758cb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/helpers/Token.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Token {
const response = new Response(
false,
401,
'Unathorized, Your token is invalid or expired'
'Unauthorized, Your token is invalid or expired'
);
return res.status(response.code).json(response);
}
Expand All @@ -71,7 +71,7 @@ class Token {
|| req.headers['x-access-token'] || req.query.token || req.body.token;
if (!token) {
return res.status(401).json(
new Response(false, 401, 'Unauthorized, Your did not provide a token')
new Response(false, 401, 'Unauthorized, You did not provide a token')
);
}
try {
Expand Down
2 changes: 1 addition & 1 deletion test/admin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('Admin controller', () => {
expect(res.status).to.eq(401);
// eslint-disable-next-line no-unused-expressions
expect(res.body.success).to.be.false;
expect(res.body.message).to.eq('Unauthorized, Your did not provide a token');
expect(res.body.message).to.eq('Unauthorized, You did not provide a token');
done();
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/auth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ describe('EMAIL VERIFICATION TEST', () => {
expect(res).to.have.status(401);
expect(res.body).to.be.an('object');
expect(res.body).to.have.keys('success', 'code', 'message');
expect(message).to.be.equal('Unathorized, Your token is invalid or expired');
expect(message).to.be.equal('Unauthorized, Your token is invalid or expired');
done();
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/trip.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ describe('Create travel request test', () => {
.send({ status: 'Rejected' })
.end((err, res) => {
expect(res.status).to.equal(401);
expect(res.body.message).to.equal('Unathorized, Your token is invalid or expired');
expect(res.body.message).to.equal('Unauthorized, Your token is invalid or expired');
expect(res.body.success).to.equal(false);
done(err);
});
Expand Down

0 comments on commit 1758cb6

Please sign in to comment.