Skip to content

Commit

Permalink
Added test case for unbinding view that was not bound
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaddhoke committed May 8, 2015
1 parent fae1c2b commit 0a3fb49
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ buster.testCase("Backbone.Validation", {
}
},

"when unbinding view which was not bound": {
"nothing happens": function(){
Backbone.Validation.unbind(new Backbone.View({model:new Backbone.Model()}));
assert(true);
}
},

"when bound to model with two validated attributes": {
setUp: function() {
Backbone.Validation.bind(this.view);
Expand Down

0 comments on commit 0a3fb49

Please sign in to comment.