summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-11-16 10:30:10 +0100
committerSamy Pessé <samypesse@gmail.com>2015-11-16 10:30:10 +0100
commit751cdd9b3b89f0569cd09ffe082998004496a949 (patch)
treebd7b57db8f88b97663d6e567c33db8d302a80950 /test
parent8df6bdca89a0fce90015340d57b3f70292083c42 (diff)
downloadgitbook-751cdd9b3b89f0569cd09ffe082998004496a949.zip
gitbook-751cdd9b3b89f0569cd09ffe082998004496a949.tar.gz
gitbook-751cdd9b3b89f0569cd09ffe082998004496a949.tar.bz2
Add test for #999
Diffstat (limited to 'test')
-rw-r--r--test/books/structure/glossary.md5
-rw-r--r--test/structure.js18
2 files changed, 20 insertions, 3 deletions
diff --git a/test/books/structure/glossary.md b/test/books/structure/glossary.md
new file mode 100644
index 0000000..8c6c0fd
--- /dev/null
+++ b/test/books/structure/glossary.md
@@ -0,0 +1,5 @@
+# Glossary
+
+### Hello
+
+Hello world
diff --git a/test/structure.js b/test/structure.js
index b25a021..90413cb 100644
--- a/test/structure.js
+++ b/test/structure.js
@@ -1,8 +1,20 @@
describe('Structure', function () {
- it('should prioritize structure defined in book.json', function() {
+ var book;
+
+ before(function() {
return books.parse('structure')
- .then(function(book) {
- book.readmeFile.should.equal('README.adoc');
+ .then(function(_book) {
+ book = _book;
});
});
+
+
+ it('should prioritize structure defined in book.json', function() {
+ book.readmeFile.should.equal('README.adoc');
+ });
+
+ it('should be case incensitive', function() {
+ book.glossaryFile.should.equal('glossary.md');
+ book.glossary.should.have.lengthOf(1);
+ });
});