Skip to content

Commit

Permalink
add additional test for #1642
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed May 17, 2024
1 parent 2d9d79e commit 61f87c9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/title_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,19 @@
(expect title_page_lines).to eql ['Document Title', 'Doc', 'Writer']
end

it 'should allow author name and email to be placed on separate lines' do
pdf = to_pdf <<~'EOS', pdf_theme: { title_page_authors_content_with_email: %({author} +\n{email}) }, analyze: true
= Document Title
Doc Writer <doc@example.org>
:doctype: book
body
EOS

title_page_lines = pdf.lines pdf.find_text page_number: 1
(expect title_page_lines).to eql ['Document Title', 'Doc Writer', 'doc@example.org']
end

it 'should allow theme to customize content of authors line by available metadata' do
pdf_theme = {
title_page_authors_content_name_only: '{authorinitials}',
Expand Down

0 comments on commit 61f87c9

Please sign in to comment.