]> source.dussan.org Git - jquery.git/commitdiff
Use custom events for testing unbind instead of the, potentially conflicting, error...
authorjeresig <jeresig@gmail.com>
Wed, 24 Mar 2010 19:39:58 +0000 (15:39 -0400)
committerjeresig <jeresig@gmail.com>
Wed, 24 Mar 2010 19:39:58 +0000 (15:39 -0400)
test/unit/event.js

index 3d401ba7ebe0e7bba5e468524d1a99f5a421238a..9e1ac8922ae62b9761387544f655ea5d0818229f 100644 (file)
@@ -443,28 +443,28 @@ test("unbind(type)", function() {
        }
        
        message = "unbind passing function";
-       $elem.bind('error', error).unbind('error',error).triggerHandler('error');
+       $elem.bind('error1', error).unbind('error1',error).triggerHandler('error1');
        
        message = "unbind all from event";
-       $elem.bind('error', error).unbind('error').triggerHandler('error');
+       $elem.bind('error1', error).unbind('error1').triggerHandler('error1');
        
        message = "unbind all";
-       $elem.bind('error', error).unbind().triggerHandler('error');
+       $elem.bind('error1', error).unbind().triggerHandler('error1');
        
        message = "unbind many with function";
-       $elem.bind('error error2',error)
-                .unbind('error error2', error )
-                .trigger('error').triggerHandler('error2');
+       $elem.bind('error1 error2',error)
+                .unbind('error1 error2', error )
+                .trigger('error1').triggerHandler('error2');
 
        message = "unbind many"; // #3538
-       $elem.bind('error error2',error)
-                .unbind('error error2')
-                .trigger('error').triggerHandler('error2');
+       $elem.bind('error1 error2',error)
+                .unbind('error1 error2')
+                .trigger('error1').triggerHandler('error2');
        
        message = "unbind without a type or handler";
-       $elem.bind("error error2.test",error)
+       $elem.bind("error1 error2.test",error)
                 .unbind()
-                .trigger("error").triggerHandler("error2");
+                .trigger("error1").triggerHandler("error2");
 });
 
 test("unbind(eventObject)", function() {