From e6da0fa6a96c9b4314303e251fd6efac98813ab8 Mon Sep 17 00:00:00 2001 From: timmywil Date: Fri, 25 Mar 2011 23:46:29 -0400 Subject: [PATCH] Bug #7369: Add test for disconnected node in closest when passing attribute selector; this was recently fixed in 1.5.2rc --- test/unit/traversing.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/traversing.js b/test/unit/traversing.js index adca5f40..f5cd8aac 100644 --- a/test/unit/traversing.js +++ b/test/unit/traversing.js @@ -148,7 +148,7 @@ test("filter(jQuery)", function() { }) test("closest()", function() { - expect(11); + expect(12); same( jQuery("body").closest("body").get(), q("body"), "closest(body)" ); same( jQuery("body").closest("html").get(), q("html"), "closest(html)" ); same( jQuery("body").closest("div").get(), [], "closest(div)" ); @@ -168,6 +168,8 @@ test("closest()", function() { // Test on disconnected node equals( jQuery("

").find("p").closest("table").length, 0, "Make sure disconnected closest work." ); + // Bug #7369 + equals( jQuery('
').closest('[foo]').length, 1, "Disconnected nodes with attribute selector" ); }); test("closest(Array)", function() {