diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-04-01 00:42:14 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-04-01 00:45:51 -0700 |
commit | 6a63708939c62c74dd3e8a032fbf0accaa2b03a5 (patch) | |
tree | 0bd21d8422e695b573625eb5c2e851eb8f4d6e93 | |
parent | e08b09f3cfd3096a5b37509bb291926e05a885cf (diff) | |
download | gitbook-6a63708939c62c74dd3e8a032fbf0accaa2b03a5.zip gitbook-6a63708939c62c74dd3e8a032fbf0accaa2b03a5.tar.gz gitbook-6a63708939c62c74dd3e8a032fbf0accaa2b03a5.tar.bz2 |
Add tests for null paths in navigation
Unfinished chapters/articles should be put in navigation
-rw-r--r-- | test/fixtures/SUMMARY.md | 3 | ||||
-rw-r--r-- | test/navigation.js | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/fixtures/SUMMARY.md b/test/fixtures/SUMMARY.md index 9f55e4c..74bbd1b 100644 --- a/test/fixtures/SUMMARY.md +++ b/test/fixtures/SUMMARY.md @@ -5,3 +5,6 @@ * [Article 2](chapter-1/ARTICLE2.md) * [Chapter 2](chapter-2/README.md) * [Chapter 3](chapter-3/README.md) +* [Chapter 4](chapter-4/README.md) + * Unfinished article +* Unfinished Chapter diff --git a/test/navigation.js b/test/navigation.js index 9b17f7f..23d98ac 100644 --- a/test/navigation.js +++ b/test/navigation.js @@ -65,4 +65,10 @@ describe('Summary navigation', function() { assert.equal(nav['chapter-2/README.html'].level, '2'); assert.equal(nav['chapter-3/README.html'].level, '3'); }); + + it('should not accept null paths', function() { + var nav = navigation(LEXED); + + assert(!nav[null]); + }); }); |