Skip to content
Permalink
Browse files

Forgot to land Justin's tests for the event fixes.

  • Loading branch information
justinbmeyer authored and jeresig committed Feb 4, 2010
1 parent e791280 commit e177465a6b65aecbb87486f6243410ffabfe14b7
Showing with 18 additions and 0 deletions.
  1. +18 −0 test/unit/event.js
@@ -300,6 +300,24 @@ test("bind(), multi-namespaced events", function() {
jQuery("#firstp").trigger("custom");
});

test("bind(), with same function", function() {
expect(2)

var count = 0 , func = function(){
count++;
};

jQuery("#liveHandlerOrder").bind("foo.bar", func).bind("foo.zar", func);
jQuery("#liveHandlerOrder").trigger("foo.bar");

equals(count, 1, "Verify binding function with multiple namespaces." );

jQuery("#liveHandlerOrder").unbind("foo.bar", func).unbind("foo.zar", func);
jQuery("#liveHandlerOrder").trigger("foo.bar");

equals(count, 1, "Verify that removing events still work." );
});

test("bind(), with different this object", function() {
expect(4);
var thisObject = { myThis: true },

0 comments on commit e177465

Please sign in to comment.
You can’t perform that action at this time.