diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-06-02 11:00:22 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-06-02 11:00:22 +0200 |
commit | a9a230dfc31d9d5092adda51344b0c9f725d9788 (patch) | |
tree | e9b864c6c0e08d37afce0df70b1a9bffdb3f94a9 /test/ebook.js | |
parent | 13fb949d6818bc47a2215ee788c392fa38e1e1d6 (diff) | |
parent | 6d53e5277100fe6a9372dea4ab9d70c769a28176 (diff) | |
download | gitbook-a9a230dfc31d9d5092adda51344b0c9f725d9788.zip gitbook-a9a230dfc31d9d5092adda51344b0c9f725d9788.tar.gz gitbook-a9a230dfc31d9d5092adda51344b0c9f725d9788.tar.bz2 |
Merge pull request #781 from GitbookIO/fix/775
Fix #775: add optional print.css style
Diffstat (limited to 'test/ebook.js')
-rw-r--r-- | test/ebook.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/ebook.js b/test/ebook.js index c9bb924..9b353d2 100644 --- a/test/ebook.js +++ b/test/ebook.js @@ -21,4 +21,35 @@ describe('eBook generator', function () { book.should.have.file("gitbook/style.css"); }); }); + + describe('Custom styles', function() { + var book; + + before(function() { + return books.generate("style-print", "ebook") + .then(function(_book) { + book = _book; + }); + }); + + it('should remove default print.css', function() { + var PAGE = fs.readFileSync( + path.join(book.options.output, "index.html"), + { encoding: "utf-8" } + ); + PAGE.should.be.html({ + "link": { + count: 1, + attributes: { + href: "./styles/print.css" + } + } + }); + }); + + it('should correctly print.css', function() { + book.should.have.file("styles"); + book.should.have.file("styles/print.css"); + }); + }) }); |