diff options
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); + }); }); }); |