Skip to content

Commit

Permalink
test(schema): repro #7357
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Jan 12, 2019
1 parent a398809 commit 3d48a22
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/schema.timestamps.test.js
Expand Up @@ -222,6 +222,22 @@ describe('schema options.timestamps', function() {
});
});

it('can skip with timestamps: false (gh-7357)', function() {
return co(function*() {
const cat = yield Cat.findOne();

const old = cat.updatedAt;

yield cb => setTimeout(() => cb(), 10);

cat.hobby = 'fishing';

yield cat.save({ timestamps: false });

assert.strictEqual(cat.updatedAt, old);
});
});

it('should change updatedAt when findOneAndUpdate', function(done) {
Cat.create({name: 'test123'}, function(err) {
assert.ifError(err);
Expand Down

0 comments on commit 3d48a22

Please sign in to comment.