From b539b6e1d99892b5b37f7eac938331cfd2ebcd51 Mon Sep 17 00:00:00 2001 From: Brandon Aaron Date: Mon, 14 Sep 2009 20:45:58 +0000 Subject: [PATCH] remove and detach unit tests were not cleaning up, causing selector tests to fail --- test/unit/manipulation.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index c942bfd..49d717f 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -706,9 +706,11 @@ var testRemove = function(method) { var count = 0; var first = jQuery("#ap").children(":first"); - first.click(function() { count++ })[method]().appendTo("body").click(); - + var cleanUp = first.click(function() { count++ })[method]().appendTo("body").click(); + equals( method == "remove" ? 0 : 1, count ); + + cleanUp.detach(); }; test("remove()", function() { -- 1.7.10.4