diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-03-15 12:37:52 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-03-15 12:37:52 +0100 |
commit | 0b4db49f5752fd2a6f72c3ba57cdb5c1b5b8ae4e (patch) | |
tree | 2b2dede4d212d40992a829cd33151d35a7a7d91d /test/output-website.js | |
parent | c499a8a13a3059e3953727866beb7c986e46dd78 (diff) | |
parent | fbffd54aa244d8a969200b0efbed3d7dc9eb73d0 (diff) | |
download | gitbook-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.js | 25 |
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 + } + }); + }); + }); }); |