Permalink
Browse files

Test update

  • Loading branch information...
1 parent b0a1ed3 commit c5019ef3548a87ce83aa655212c107a06cb6cba0 @1602 committed Apr 1, 2013
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/validations.test.js
@@ -73,6 +73,20 @@ describe('validations', function() {
});
});
+ it('should work on update', function(done) {
+ User.validatesPresenceOf('name');
+ User.create({name: 'Valid'}, function(e, d) {
+ d.updateAttribute('name', null, function(e) {
+ should.exist(e);
+ e.should.be.instanceOf(Error);
+ d.updateAttribute('name', 'Vasiliy', function(e) {
+ should.not.exist(e);
+ done();
+ });
+ })
+ });
+ });
+
});
});

0 comments on commit c5019ef

Please sign in to comment.