summaryrefslogtreecommitdiffstats
path: root/test/summary.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-03-31 12:16:16 -0700
committerSamy Pessé <samypesse@gmail.com>2014-03-31 12:16:16 -0700
commit77a4c1042c7c13327641fb057c3c203cbf868782 (patch)
treeacffe873bdf71e8dc89e973bc41ef5a30be63533 /test/summary.js
parent6df59745b1e32535bc529f97d3c752afac50095d (diff)
parent89593f46ab0c7dddab8414c5da55f0faeb3e61a4 (diff)
downloadgitbook-77a4c1042c7c13327641fb057c3c203cbf868782.zip
gitbook-77a4c1042c7c13327641fb057c3c203cbf868782.tar.gz
gitbook-77a4c1042c7c13327641fb057c3c203cbf868782.tar.bz2
Merge branch 'master' of https://github.com/GitbookIO/gitbook
Diffstat (limited to 'test/summary.js')
-rw-r--r--test/summary.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/summary.js b/test/summary.js
index 2a1af96..5439182 100644
--- a/test/summary.js
+++ b/test/summary.js
@@ -31,4 +31,13 @@ describe('Summary parsing', function () {
assert(LEXED.chapters[1].chapter.title);
assert(LEXED.chapters[2].chapter.title);
});
+
+ it('should normalize paths from .md to .html', function() {
+ assert.equal(LEXED.chapters[0].chapter.path,'chapter-1/README.html');
+ assert.equal(LEXED.chapters[0].chapter._path,'chapter-1/README.md');
+ assert.equal(LEXED.chapters[1].chapter.path,'chapter-2/README.html');
+ assert.equal(LEXED.chapters[1].chapter._path,'chapter-2/README.md');
+ assert.equal(LEXED.chapters[2].chapter.path,'chapter-3/README.html');
+ assert.equal(LEXED.chapters[2].chapter._path,'chapter-3/README.md');
+ });
});