Skip to content

Commit 6f3ca7c

Browse files
committed
Add test for cover_first option from JazzCore#57
1 parent d01db08 commit 6f3ca7c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/pdfkit-tests.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,19 @@ def test_cover_and_toc(self):
192192
command = r.command()
193193
self.assertEqual(command[-7:], ['toc', '--xsl-style-sheet', 'test.xsl', 'cover', 'test.html', '-', '-'])
194194

195+
def test_cover_and_toc_cover_first(self):
196+
options = {
197+
'page-size': 'Letter',
198+
'margin-top': '0.75in',
199+
'margin-right': '0.75in',
200+
'margin-bottom': '0.75in',
201+
'margin-left': '0.75in',
202+
'encoding': "UTF-8"
203+
}
204+
r = pdfkit.PDFKit('html', 'string', options=options, toc={'xsl-style-sheet': 'test.xsl'}, cover='test.html', cover_first=True)
205+
command = r.command()
206+
self.assertEqual(command[-7:], ['cover', 'test.html', 'toc', '--xsl-style-sheet', 'test.xsl', '-', '-'])
207+
195208
def test_outline_options(self):
196209
options = {
197210
'outline': None,

0 commit comments

Comments
 (0)