From 694becea3898f060ed815cf864ea1d4e87a800fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Tue, 9 Jan 2007 15:27:00 +0000 Subject: [PATCH] Added test for next/prev --- src/jquery/coreTest.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 58616db..6efaa84 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -398,6 +398,16 @@ test("parent[s]([String])", function() { ok( $("#groups").parents("div")[0].id == "main", "Filtered parents check2" ); }); +test("next/prev([String])", function() { + ok( $("#ap").next()[0].id == "foo", "Simple next check" ); + ok( $("#ap").next("div")[0].id == "foo", "Filtered next check" ); + ok( $("#ap").next("p").length == 0, "Filtered next check, no match" ); + + ok( $("#foo").prev()[0].id == "ap", "Simple prev check" ); + ok( $("#foo").prev("p")[0].id == "ap", "Filtered prev check" ); + ok( $("#foo").prev("div").length == 0, "Filtered prev check, no match" ); +}); + test("show()", function() { expect(1); var pass = true, div = $("div"); -- 1.7.10.4