Skip to content
This repository
Browse code

Test update

  • Loading branch information...
commit c5019ef3548a87ce83aa655212c107a06cb6cba0 1 parent b0a1ed3
Anatoliy Chakkaev authored

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. 14  test/validations.test.js
14  test/validations.test.js
@@ -73,6 +73,20 @@ describe('validations', function() {
73 73
                 });
74 74
             });
75 75
 
  76
+            it('should work on update', function(done) {
  77
+                User.validatesPresenceOf('name');
  78
+                User.create({name: 'Valid'}, function(e, d) {
  79
+                    d.updateAttribute('name', null, function(e) {
  80
+                        should.exist(e);
  81
+                        e.should.be.instanceOf(Error);
  82
+                        d.updateAttribute('name', 'Vasiliy', function(e) {
  83
+                            should.not.exist(e);
  84
+                            done();
  85
+                        });
  86
+                    })
  87
+                });
  88
+            });
  89
+
76 90
         });
77 91
     });
78 92
 

0 notes on commit c5019ef

Please sign in to comment.
Something went wrong with that request. Please try again.