|
|
@@ -375,8 +375,10 @@ describe('ProjectInviteTests', function () {
|
|
|
return done(err)
|
|
|
}
|
|
|
expect(response.statusCode).to.equal(400)
|
|
|
- expect(response.body.validation.body.message).to.equal(
|
|
|
- '"email" must be a string'
|
|
|
+ expect(body.details).to.have.lengthOf(1)
|
|
|
+ expect(response.body.details[0].path).to.eql(['body', 'email'])
|
|
|
+ expect(response.body.details[0].message).to.equal(
|
|
|
+ 'Invalid input: expected string, received object'
|
|
|
)
|
|
|
done()
|
|
|
}
|
|
|
@@ -402,8 +404,13 @@ describe('ProjectInviteTests', function () {
|
|
|
return done(err)
|
|
|
}
|
|
|
expect(response.statusCode).to.equal(400)
|
|
|
- expect(response.body.validation.body.message).to.equal(
|
|
|
- '"privileges" must be one of [readOnly, readAndWrite, review]'
|
|
|
+ expect(body.details).to.have.lengthOf(1)
|
|
|
+ expect(response.body.details[0].path).to.eql([
|
|
|
+ 'body',
|
|
|
+ 'privileges',
|
|
|
+ ])
|
|
|
+ expect(response.body.details[0].message).to.equal(
|
|
|
+ 'Invalid option: expected one of "readOnly"|"readAndWrite"|"review"'
|
|
|
)
|
|
|
done()
|
|
|
}
|