Merge branch 'fix_update_attributes_error' of https://github.com/wpjunior/loopback-datasource-juggler into wpjunior-fix_update_attributes_error

This commit is contained in:
Raymond Feng 2015-11-26 09:31:40 -08:00
commit 6f7fc5030a
1 changed files with 12 additions and 0 deletions

View File

@ -606,6 +606,18 @@ describe('manipulation', function () {
.catch(done);
});
it('should raises on connector error', function(done) {
var fakeConnector = {
updateAttributes: function (model, id, data, options, cb) {
cb(new Error('Database Error'));
}
};
person.getConnector = function () { return fakeConnector; };
person.updateAttributes({name: 'John'}, function(err, p) {
should.exist(err);
done();
});
});
});
describe('updateOrCreate', function() {