mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Updated invitations test coverage with more specific checks
refs https://github.com/TryGhost/Ghost/issues/11878 - Updated test cases in preparation to improve messaging in referenced issue.
This commit is contained in:
parent
80af56b530
commit
e9204c9168
3 changed files with 18 additions and 3 deletions
|
@ -301,7 +301,12 @@ describe('Authentication API v3', function () {
|
|||
})
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||
.expect(401);
|
||||
.expect(401)
|
||||
.then((res) => {
|
||||
should.exist(res.body.errors);
|
||||
res.body.errors[0].type.should.eql('UnauthorizedError');
|
||||
res.body.errors[0].message.should.eql('Invalid token structure');
|
||||
});
|
||||
});
|
||||
|
||||
it('reset password: generate reset token', function () {
|
||||
|
|
|
@ -409,7 +409,12 @@ describe('Authentication API v2', function () {
|
|||
})
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||
.expect(401);
|
||||
.expect(401)
|
||||
.then((res) => {
|
||||
should.exist(res.body.errors);
|
||||
res.body.errors[0].type.should.eql('UnauthorizedError');
|
||||
res.body.errors[0].message.should.eql('Invalid token structure');
|
||||
});
|
||||
});
|
||||
|
||||
it('reset password: generate reset token', function () {
|
||||
|
|
|
@ -285,7 +285,12 @@ describe('Authentication API v3', function () {
|
|||
})
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||
.expect(401);
|
||||
.expect(401)
|
||||
.then((res) => {
|
||||
should.exist(res.body.errors);
|
||||
res.body.errors[0].type.should.eql('UnauthorizedError');
|
||||
res.body.errors[0].message.should.eql('Invalid token structure');
|
||||
});
|
||||
});
|
||||
|
||||
it('reset password: generate reset token', function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue