summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-11-16 09:55:45 +0100
committerSamy Pessé <samypesse@gmail.com>2015-11-16 09:55:45 +0100
commit2ae83b32472bb4eab339a971ff06c63f02117c59 (patch)
tree38e9381674941b6c57478ce055e54e5a7714d2b3 /test
parent5d907f234e8fe04755714769c3b5b384a6b639b8 (diff)
downloadgitbook-2ae83b32472bb4eab339a971ff06c63f02117c59.zip
gitbook-2ae83b32472bb4eab339a971ff06c63f02117c59.tar.gz
gitbook-2ae83b32472bb4eab339a971ff06c63f02117c59.tar.bz2
Add failing test for #1013
Diffstat (limited to 'test')
-rw-r--r--test/books/structure/README.adoc1
-rw-r--r--test/books/structure/README.md1
-rw-r--r--test/books/structure/SUMMARY.md1
-rw-r--r--test/books/structure/book.json5
-rw-r--r--test/structure.js8
5 files changed, 16 insertions, 0 deletions
diff --git a/test/books/structure/README.adoc b/test/books/structure/README.adoc
new file mode 100644
index 0000000..354647f
--- /dev/null
+++ b/test/books/structure/README.adoc
@@ -0,0 +1 @@
+== Readme for the bookk
diff --git a/test/books/structure/README.md b/test/books/structure/README.md
new file mode 100644
index 0000000..94f18a8
--- /dev/null
+++ b/test/books/structure/README.md
@@ -0,0 +1 @@
+# Readme for GitHub
diff --git a/test/books/structure/SUMMARY.md b/test/books/structure/SUMMARY.md
new file mode 100644
index 0000000..ac9323c
--- /dev/null
+++ b/test/books/structure/SUMMARY.md
@@ -0,0 +1 @@
+# Summary
diff --git a/test/books/structure/book.json b/test/books/structure/book.json
new file mode 100644
index 0000000..110e0ba
--- /dev/null
+++ b/test/books/structure/book.json
@@ -0,0 +1,5 @@
+{
+ "structure": {
+ "readme": "README.adoc"
+ }
+} \ No newline at end of file
diff --git a/test/structure.js b/test/structure.js
new file mode 100644
index 0000000..b25a021
--- /dev/null
+++ b/test/structure.js
@@ -0,0 +1,8 @@
+describe('Structure', function () {
+ it('should prioritize structure defined in book.json', function() {
+ return books.parse('structure')
+ .then(function(book) {
+ book.readmeFile.should.equal('README.adoc');
+ });
+ });
+});