summaryrefslogtreecommitdiffstats
path: root/test/languages.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/languages.js')
-rw-r--r--test/languages.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/languages.js b/test/languages.js
new file mode 100644
index 0000000..abdc5dd
--- /dev/null
+++ b/test/languages.js
@@ -0,0 +1,40 @@
+var fs = require('fs');
+var path = require('path');
+
+describe('Languages', function () {
+ describe('Parsing', function() {
+ var book;
+
+ before(function() {
+ return books.parse("languages")
+ .then(function(_book) {
+ book = _book;
+ });
+ });
+
+ it('should correctly list languages', function() {
+ book.should.have.property("books");
+ book.books.should.have.lengthOf(2);
+
+ book.books[0].options.language.should.be.equal("en");
+ book.books[1].options.language.should.be.equal("fr");
+ });
+ });
+
+ describe('Generation', function() {
+ var book;
+
+ before(function() {
+ return books.generate("languages", "website")
+ .then(function(_book) {
+ book = _book;
+ });
+ });
+
+ it('should correctly create books', function() {
+ book.should.have.file("index.html");
+ book.should.have.file("en/index.html");
+ book.should.have.file("fr/index.html");
+ });
+ });
+});