X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fevent.js;h=21167c7de2177beb1673e9f9a86e726caf455a10;hb=dd5c26304af1c5f884ebf0baa5df28a2f8a8c4cc;hp=e85c4bd9d5aea41f5773300e535c5ad6b028d945;hpb=be2407e233f1731e3f0ec79bdc8efaadd1f32f9f;p=jquery.git diff --git a/test/unit/event.js b/test/unit/event.js index e85c4bd..21167c7 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -72,7 +72,7 @@ test("bind(), multiple events at once and namespaces", function() { }); test("bind(), namespace with special add", function() { - expect(18); + expect(19); var div = jQuery("
").bind("test", function(e) { ok( true, "Test event fired." ); @@ -87,7 +87,9 @@ test("bind(), namespace with special add", function() { equals( e.target, div[0], "And that the target is correct." ); }, setup: function(){}, - teardown: function(){}, + teardown: function(){ + ok(true, "Teardown called."); + }, add: function( handleObj ) { var handler = handleObj.handler; handleObj.handler = function(e) { @@ -116,6 +118,8 @@ test("bind(), namespace with special add", function() { // Should trigger 2 div.trigger("test.b"); + + div.unbind("test"); }); test("bind(), no data", function() { @@ -755,7 +759,7 @@ test("toggle(Function, Function, ...)", function() { }); test(".live()/.die()", function() { - expect(65); + expect(66); var submit = 0, div = 0, livea = 0, liveb = 0; @@ -1020,6 +1024,14 @@ test(".live()/.die()", function() { equals( livee, 1, "Click, deep selector." ); jQuery("#nothiddendiv div").die("click"); + + jQuery("#nothiddendiv div").live("blur", function(){ + ok( true, "Live div trigger blur." ); + }); + + jQuery("#nothiddendiv div").trigger("blur"); + + jQuery("#nothiddendiv div").die("blur"); }); test("die all bound events", function(){