Mongoose 4.x (#9928)

* update mongoose to ^4.x

* another fix
This commit is contained in:
Matteo Pagliazzi
2018-02-02 16:37:36 +01:00
committed by GitHub
parent 389d6f18b4
commit 1fbdb7dbd0
8 changed files with 531 additions and 340 deletions

View File

@@ -131,7 +131,7 @@ describe('errorHandler', () => {
});
it('handle Mongoose Validation errors', () => {
let error = new Error('User validation failed.');
let error = new Error('User validation failed');
error.name = 'ValidationError';
error.errors = {
@@ -151,7 +151,7 @@ describe('errorHandler', () => {
expect(res.json).to.be.calledWith({
success: false,
error: 'BadRequest',
message: 'User validation failed.',
message: 'User validation failed',
errors: [
{ path: 'auth.local.email', message: 'Invalid email.', value: 'not an email' },
],