From 0a3fb4981b0dafc7b154c672316c2454fbb34123 Mon Sep 17 00:00:00 2001 From: Akshad Dhoke Date: Fri, 8 May 2015 01:42:34 -0500 Subject: [PATCH] Added test case for unbinding view that was not bound --- tests/general.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/general.js b/tests/general.js index a6ffe484..48435373 100644 --- a/tests/general.js +++ b/tests/general.js @@ -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);