summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-03-11 11:21:47 +0100
committerSamy Pessé <samypesse@gmail.com>2016-03-11 11:21:47 +0100
commit9d67a0e6560cf7441a267d98a412376586b65d1d (patch)
treeeb8e81fa819dd645b2cbb832a6f82a88df76e8cd /test
parent093005bfd926fdae42706e0554ad1a985196d9d7 (diff)
downloadgitbook-9d67a0e6560cf7441a267d98a412376586b65d1d.zip
gitbook-9d67a0e6560cf7441a267d98a412376586b65d1d.tar.gz
gitbook-9d67a0e6560cf7441a267d98a412376586b65d1d.tar.bz2
Add theme for extending theme from book
Diffstat (limited to 'test')
-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
+ }
+ });
+ });
+ });
});