diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-01-28 18:39:44 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-01-28 18:39:44 +0100 |
commit | 4b465bedea94688a9adfb9136c9d2970d5496274 (patch) | |
tree | 7e29cc10d07b86d86239bd1cd59fab7996b412ce /test/4-langs.js | |
parent | 461ef2c68e9086bd77f0a25d57956ebf60308f7c (diff) | |
download | gitbook-4b465bedea94688a9adfb9136c9d2970d5496274.zip gitbook-4b465bedea94688a9adfb9136c9d2970d5496274.tar.gz gitbook-4b465bedea94688a9adfb9136c9d2970d5496274.tar.bz2 |
Fix tests for languages parsing
Diffstat (limited to 'test/4-langs.js')
-rw-r--r-- | test/4-langs.js | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/test/4-langs.js b/test/4-langs.js index 599cb43..dbde992 100644 --- a/test/4-langs.js +++ b/test/4-langs.js @@ -18,18 +18,29 @@ describe('Langs', function() { }); }); - it('should parse languages list', function() { - return mock.setupDefaultBook({ - 'LANGS.md': '# Languages\n\n' - + '* [en](./en)\n' - + '* [fr](./fr)\n\n' - }) - .then(function(book) { - return book.langs.load() - .then(function() { - book.langs.count().should.equal(2); + describe('Non-empty languages list', function() { + var book; + + before(function() { + return mock.setupDefaultBook({ + 'LANGS.md': '# Languages\n\n' + + '* [en](./en)\n' + + '* [fr](./fr)\n\n' + }) + .then(function(_book) { + book = _book; + + return book.langs.load(); }); }); + + it('should correctly count languages', function() { + book.langs.count().should.equal(2); + }); + + it('should correctly define book as multilingual', function() { + book.isMultilingual().should.equal(true); + }); }); }); |