From 2ae83b32472bb4eab339a971ff06c63f02117c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Mon, 16 Nov 2015 09:55:45 +0100 Subject: [PATCH] Add failing test for #1013 --- test/books/structure/README.adoc | 1 + test/books/structure/README.md | 1 + test/books/structure/SUMMARY.md | 1 + test/books/structure/book.json | 5 +++++ test/structure.js | 8 ++++++++ 5 files changed, 16 insertions(+) create mode 100644 test/books/structure/README.adoc create mode 100644 test/books/structure/README.md create mode 100644 test/books/structure/SUMMARY.md create mode 100644 test/books/structure/book.json create mode 100644 test/structure.js diff --git a/test/books/structure/README.adoc b/test/books/structure/README.adoc new file mode 100644 index 000000000..354647f02 --- /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 000000000..94f18a813 --- /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 000000000..ac9323cbc --- /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 000000000..110e0ba35 --- /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 000000000..b25a021fb --- /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'); + }); + }); +});