summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/fixtures/test5/README.md3
-rw-r--r--test/json.js12
2 files changed, 11 insertions, 4 deletions
diff --git a/test/fixtures/test5/README.md b/test/fixtures/test5/README.md
index 33ee83a..3db21b2 100644
--- a/test/fixtures/test5/README.md
+++ b/test/fixtures/test5/README.md
@@ -1,4 +1,5 @@
# Test Content inclusion
{% include "./test.md" %}
-{% include "git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test.md" %}
+Git1:{% include "git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test.md" %}
+Git2:{% include "git+https://gist.github.com/69ea4542e4c8967d2fa7.git/test2.md" %} \ No newline at end of file
diff --git a/test/json.js b/test/json.js
index 5852df7..b7cdefa 100644
--- a/test/json.js
+++ b/test/json.js
@@ -42,12 +42,18 @@ describe('JSON generator', function () {
}, done);
});
- it('should correctly generate a book with inclusion', function(done) {
+ it('should correctly generate a book with local inclusion', function(done) {
testGeneration(books[5], "json", function(output) {
- assert(fs.existsSync(path.join(output, "README.json")));
-
var readme = JSON.parse(fs.readFileSync(path.join(output, "README.json")));
assert(readme.sections[0].content.indexOf('Hello World') > 0);
}, done);
});
+
+ it('should correctly generate a book with external inclusion', function(done) {
+ testGeneration(books[5], "json", function(output) {
+ var readme = JSON.parse(fs.readFileSync(path.join(output, "README.json")));
+ assert(readme.sections[0].content.indexOf('Git1:Hello from git') > 0);
+ assert(readme.sections[0].content.indexOf('Git2:First Hello. Hello from git') > 0);
+ }, done);
+ });
});