diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-03-25 23:46:29 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-03-25 23:46:29 -0400 |
commit | e6da0fa6a96c9b4314303e251fd6efac98813ab8 (patch) | |
tree | 1e1ae5c4b6df75ceb34a3db0f43d7008855053f8 /test/unit | |
parent | b8013581ced78fb6c2005e76b44211e01fc2e466 (diff) | |
download | jquery-e6da0fa6a96c9b4314303e251fd6efac98813ab8.tar.gz jquery-e6da0fa6a96c9b4314303e251fd6efac98813ab8.zip |
Bug #7369: Add test for disconnected node in closest when passing attribute selector; this was recently fixed in 1.5.2rc
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/traversing.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/traversing.js b/test/unit/traversing.js index adca5f401..f5cd8aacf 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("<div><p></p></div>").find("p").closest("table").length, 0, "Make sure disconnected closest work." ); + // Bug #7369 + equals( jQuery('<div foo="bar"></div>').closest('[foo]').length, 1, "Disconnected nodes with attribute selector" ); }); test("closest(Array)", function() { |