diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-26 09:41:26 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-26 09:41:26 +0100 |
commit | d3d64f636c859f7f01a64f7774cf70bd8ccdc562 (patch) | |
tree | 4f7731f37c3a793d187b0ab1cd77680e69534c6c /test/navigation.js | |
parent | 4cb9cbb5ae3aa8f9211ffa3ac5e3d34232c0ca4f (diff) | |
parent | eef072693b17526347c37b66078a5059c71caa31 (diff) | |
download | gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.zip gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.gz gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.bz2 |
Merge pull request #1109 from GitbookIO/3.0.0
Version 3.0.0
Diffstat (limited to 'test/navigation.js')
-rw-r--r-- | test/navigation.js | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/test/navigation.js b/test/navigation.js deleted file mode 100644 index 9118b3c..0000000 --- a/test/navigation.js +++ /dev/null @@ -1,61 +0,0 @@ -var should = require("should"); - -describe("Navigation", function () { - var book; - - before(function() { - return books.parse("summary") - .then(function(_book) { - book = _book; - }); - }); - - it("should correctly parse navigation as a map", function() { - book.should.have.property("navigation"); - book.navigation.should.have.property("README.md"); - book.navigation.should.have.property("README.md"); - }); - - it("should correctly include filenames", function() { - book.navigation.should.have.property("README.md"); - book.navigation.should.have.property("PAGE1.md"); - book.navigation.should.have.property("folder/PAGE2.md"); - book.navigation.should.not.have.property("NOTFOUND.md"); - }); - - it("should correctly detect next/prev for README", function() { - var README = book.navigation["README.md"]; - - README.index.should.equal(0); - README.should.have.property("next"); - should(README.prev).not.be.ok(); - - README.next.should.have.property("path"); - README.next.path.should.equal("PAGE1.md"); - }); - - it("should correctly detect next/prev a page", function() { - var PAGE = book.navigation["PAGE1.md"]; - - PAGE.index.should.equal(1); - PAGE.should.have.property("next"); - PAGE.should.have.property("prev"); - - PAGE.prev.should.have.property("path"); - PAGE.prev.path.should.equal("README.md"); - - PAGE.next.should.have.property("path"); - PAGE.next.path.should.equal("folder/PAGE2.md"); - }); - - it("should correctly detect next/prev for last page", function() { - var PAGE = book.navigation["folder/PAGE2.md"]; - - PAGE.index.should.equal(2); - PAGE.should.have.property("prev"); - should(PAGE.next).not.be.ok(); - - PAGE.prev.should.have.property("path"); - PAGE.prev.path.should.equal("PAGE1.md"); - }); -}); |