summaryrefslogtreecommitdiffstats
path: root/test/output-website.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-03-15 12:37:52 +0100
committerSamy Pessé <samypesse@gmail.com>2016-03-15 12:37:52 +0100
commit0b4db49f5752fd2a6f72c3ba57cdb5c1b5b8ae4e (patch)
tree2b2dede4d212d40992a829cd33151d35a7a7d91d /test/output-website.js
parentc499a8a13a3059e3953727866beb7c986e46dd78 (diff)
parentfbffd54aa244d8a969200b0efbed3d7dc9eb73d0 (diff)
downloadgitbook-0b4db49f5752fd2a6f72c3ba57cdb5c1b5b8ae4e.zip
gitbook-0b4db49f5752fd2a6f72c3ba57cdb5c1b5b8ae4e.tar.gz
gitbook-0b4db49f5752fd2a6f72c3ba57cdb5c1b5b8ae4e.tar.bz2
Merge pull request #1181 from GitbookIO/feature/allplugins_tpl
All plugins can extend templates/theme
Diffstat (limited to 'test/output-website.js')
-rw-r--r--test/output-website.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/output-website.js b/test/output-website.js
index 19459b3..2d936be 100644
--- a/test/output-website.js
+++ b/test/output-website.js
@@ -1,3 +1,5 @@
+var fs = require('fs');
+
var mock = require('./mock');
var WebsiteOutput = require('../lib/output/website');
@@ -95,5 +97,28 @@ describe('Website Output', function() {
});
});
+ describe('Theming', function() {
+ var output;
+
+ before(function() {
+ return mock.outputDefaultBook(WebsiteOutput, {
+ '_layouts/website/page.html': '{% extends "website/page.html" %}{% block body %}{{ super() }}<div id="theming-added"></div>{% endblock %}'
+
+ })
+ .then(function(_output) {
+ output = _output;
+ });
+ });
+
+ it('should extend default theme', function() {
+ var readme = fs.readFileSync(output.resolve('index.html'), 'utf-8');
+
+ readme.should.be.html({
+ '#theming-added': {
+ count: 1
+ }
+ });
+ });
+ });
});