Commit dc4c9abc authored by Robert Katic's avatar Robert Katic Committed by jeresig

Correcting some imperfections in test added in previous commit.

parent da5706c9
...@@ -210,7 +210,7 @@ test("live/die(Object), delegate/undelegate(String, Object)", function() { ...@@ -210,7 +210,7 @@ test("live/die(Object), delegate/undelegate(String, Object)", function() {
expect(6); expect(6);
var clickCounter = 0, mouseoverCounter = 0, var clickCounter = 0, mouseoverCounter = 0,
$p = jQuery("#firstp"), $a = $p.find("a"); $p = jQuery("#firstp"), $a = $p.find("a").first();
var events = { var events = {
click: function( event ) { click: function( event ) {
...@@ -229,20 +229,20 @@ test("live/die(Object), delegate/undelegate(String, Object)", function() { ...@@ -229,20 +229,20 @@ test("live/die(Object), delegate/undelegate(String, Object)", function() {
$p.delegate( "a", events, 2 ); $p.delegate( "a", events, 2 );
trigger(); trigger();
equals( clickCounter, 3, "live/delegate(Object)" ); equals( clickCounter, 3, "live/delegate" );
equals( mouseoverCounter, 3, "live/delegate(Object)" ); equals( mouseoverCounter, 3, "live/delegate" );
$p.undelegate( "a", events ); $p.undelegate( "a", events );
trigger(); trigger();
equals( clickCounter, 4, "undelegate(Object)" ); equals( clickCounter, 4, "undelegate" );
equals( mouseoverCounter, 4, "undelegate(Object)" ); equals( mouseoverCounter, 4, "undelegate" );
$a.die( events ); $a.die( events );
trigger(); trigger();
equals( clickCounter, 4, "die(Object)" ); equals( clickCounter, 4, "die" );
equals( mouseoverCounter, 4, "die(Object)" ); equals( mouseoverCounter, 4, "die" );
}); });
test("bind(), iframes", function() { test("bind(), iframes", function() {
......
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