Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! Strict mode now always return validationE…
Browse files Browse the repository at this point in the history
…rror
  • Loading branch information
David Cheung committed Sep 7, 2016
1 parent 8f2b55d commit dd9dee6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/manipulation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,13 +622,13 @@ describe('manipulation', function() {
Person.definition.settings.strict = 'validate';
Person.findById(person.id, function(err, p) {
p.updateAttributes({foo: 'bar'},
function(err1, p1) {
should.exist(err1);
err1.name.should.equal('ValidationError');
err1.message.should.containEql('`foo` is not defined in the model');
Person.findById(person.id, function(e2, p2) {
if (e2) return done(e2);
should.not.exist(p2.foo);
function(err, p) {
should.exist(err);
err.name.should.equal('ValidationError');
err.message.should.containEql('`foo` is not defined in the model');
Person.findById(person.id, function(e, p) {
if (e) return done(e);
should.not.exist(p.foo);
done();
});
});
Expand Down

0 comments on commit dd9dee6

Please sign in to comment.