Commit e177465a authored by Justin Meyer's avatar Justin Meyer Committed by jeresig

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

parent e7912805
......@@ -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 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment