diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 16:21:04 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 17:06:39 -0700 |
commit | 3f3bade58e3b258aadab8ecf084004d06e62cede (patch) | |
tree | 9f2d47b9032368b0affb94320c922b7bb6041fe5 /test/summary.js | |
parent | 0821b10e18d011da6fcbb22631170f7a46e819f4 (diff) | |
download | gitbook-3f3bade58e3b258aadab8ecf084004d06e62cede.zip gitbook-3f3bade58e3b258aadab8ecf084004d06e62cede.tar.gz gitbook-3f3bade58e3b258aadab8ecf084004d06e62cede.tar.bz2 |
Change summary data format
Simplify chapter objects, by making them identical to article objects
besides the .articles attribute
Diffstat (limited to 'test/summary.js')
-rw-r--r-- | test/summary.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/summary.js b/test/summary.js index 5439182..bf21ce1 100644 --- a/test/summary.js +++ b/test/summary.js @@ -23,21 +23,21 @@ describe('Summary parsing', function () { }); it('should detect paths and titles', function() { - assert(LEXED.chapters[0].chapter.path); - assert(LEXED.chapters[1].chapter.path); - assert(LEXED.chapters[2].chapter.path); + assert(LEXED.chapters[0].path); + assert(LEXED.chapters[1].path); + assert(LEXED.chapters[2].path); - assert(LEXED.chapters[0].chapter.title); - assert(LEXED.chapters[1].chapter.title); - assert(LEXED.chapters[2].chapter.title); + assert(LEXED.chapters[0].title); + assert(LEXED.chapters[1].title); + assert(LEXED.chapters[2].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'); + assert.equal(LEXED.chapters[0].path,'chapter-1/README.html'); + assert.equal(LEXED.chapters[0]._path,'chapter-1/README.md'); + assert.equal(LEXED.chapters[1].path,'chapter-2/README.html'); + assert.equal(LEXED.chapters[1]._path,'chapter-2/README.md'); + assert.equal(LEXED.chapters[2].path,'chapter-3/README.html'); + assert.equal(LEXED.chapters[2]._path,'chapter-3/README.md'); }); }); |