From c27961a1700cdbcbf90d53420b1df304988d6c5d Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 5 Aug 2014 09:05:11 +0200 Subject: Add a test for "link rel='next'" kind of link. While this is not strictly valid, we don't put the link markup into `` to avoid adding more code just for those two new tests. --- tests/dom_tests/dom_tests.coffee | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee index 04c81068..145b5866 100644 --- a/tests/dom_tests/dom_tests.coffee +++ b/tests/dom_tests/dom_tests.coffee @@ -215,6 +215,21 @@ context "Find prev / next links", goNext() assert.equal '#second', window.location.hash + should "find link relation in header", -> + document.getElementById("test-div").innerHTML = """ + + """ + goNext() + assert.equal '#first', window.location.hash + + should "favor link relation to text matching", -> + document.getElementById("test-div").innerHTML = """ + + next + """ + goNext() + assert.equal '#first', window.location.hash + createLinks = (n) -> for i in [0...n] by 1 link = document.createElement("a") -- cgit v1.2.3