Skip to content

Commit

Permalink
test(model): repro #5061
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Mar 11, 2017
1 parent 0540c8a commit 057bd3f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/model.create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var start = require('./common'),
*/

var schema = new Schema({
title: String
title: { type: String, required: true }
});


Expand Down Expand Up @@ -186,6 +186,15 @@ describe('model', function() {
}).end();
}, done).end();
});

it('if callback is falsy, will ignore it (gh-5061)', function(done) {
B.create({ title: 'test' }, null).
then(function(doc) {
assert.equal(doc.title, 'test');
done();
}).
catch(done);
});
});
});
});

0 comments on commit 057bd3f

Please sign in to comment.