diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 17:19:30 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 17:36:01 -0700 |
commit | 4607f406abe78b56944582549f4ffc5dbc1ed8cf (patch) | |
tree | 21a108b8b1b10a76b554f936c468f431ded45bfd /test/navigation.js | |
parent | bc5d963c5e5f593b5bc465b1ab34a7d9984bedb0 (diff) | |
download | gitbook-4607f406abe78b56944582549f4ffc5dbc1ed8cf.zip gitbook-4607f406abe78b56944582549f4ffc5dbc1ed8cf.tar.gz gitbook-4607f406abe78b56944582549f4ffc5dbc1ed8cf.tar.bz2 |
Add navigation tests for first page for README of a chapter
Diffstat (limited to 'test/navigation.js')
-rw-r--r-- | test/navigation.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/navigation.js b/test/navigation.js index d34c12a..8f82911 100644 --- a/test/navigation.js +++ b/test/navigation.js @@ -14,18 +14,23 @@ describe('Summary navigation', function() { it('should provide next & prev entries for a file', function() { var nav = navigation(LEXED, [ 'README.html', + 'chapter-1/README.html', 'chapter-1/ARTICLE1.html', 'chapter-1/ARTICLE2.html' ]); // Make sure it found the files we gave it assert(nav['README.html']); + assert(nav['chapter-1/README.html']); assert(nav['chapter-1/ARTICLE1.html']); assert(nav['chapter-1/ARTICLE2.html']); assert.equal(nav['README.html'].prev, null); assert.equal(nav['README.html'].next.path, 'chapter-1/README.html'); + assert.equal(nav['chapter-1/README.html'].prev, null); + assert.equal(nav['chapter-1/README.html'].next.path, 'chapter-1/ARTICLE1.html'); + assert.equal(nav['chapter-1/ARTICLE1.html'].prev.path, 'chapter-1/README.html'); assert.equal(nav['chapter-1/ARTICLE1.html'].next.path, 'chapter-1/ARTICLE2.html'); |