test for updateAll

This commit is contained in:
rudzon 2015-02-24 13:56:57 +02:00
parent dbe9329a37
commit 3953cc3e2f
1 changed files with 18 additions and 0 deletions

View File

@ -654,6 +654,24 @@ describe('basic-querying', function () {
});
});
it('should ignore undefined values of data', function (done) {
User.update({name: 'John Lennon'}, {name: undefined}, function (err) {
should.not.exist(err);
User.find({where: {name: 'John Lennon'}}, function (err, data) {
should.not.exist(err);
data.length.should.equal(1);
done();
});
});
});
it('should coerce data', function (done) {
User.update({name: 'John Lennon'}, {birthday: 'invalidate'}, function (err) {
should.exist(err);
done();
});
});
});
});