diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-10-12 03:14:59 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2019-10-12 03:14:59 -0600 |
| commit | fe3beebc93cea079248b85a4a91c7d70745cceaf (patch) | |
| tree | b205c7bf6f61f67ed113c754937937cfc9c37bf2 | |
| parent | 9405a3232e3256299fecc747f9e74d91ce6d0c26 (diff) | |
verify running content is not used if height of periphery is nil
| -rw-r--r-- | spec/running_content_spec.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/running_content_spec.rb b/spec/running_content_spec.rb index 0888984b..7ef77a1b 100644 --- a/spec/running_content_spec.rb +++ b/spec/running_content_spec.rb @@ -36,7 +36,18 @@ describe 'Asciidoctor::PDF::Converter - Running Content' do end it 'should not add running footer if nofooter attribute is set' do - pdf = to_pdf <<~'EOS', attributes: { 'nofooter' => 'nil' }, analyze: true + pdf = to_pdf <<~'EOS', attributes: { 'nofooter' => '' }, analyze: true + = Document Title + :doctype: book + + body + EOS + + (expect pdf.find_text %r/^\d+$/).to be_empty + end + + it 'should not add running footer if height is nil' do + pdf = to_pdf <<~'EOS', attributes: { 'nofooter' => nil }, pdf_theme: { footer_height: nil }, analyze: true = Document Title :doctype: book @@ -47,7 +58,7 @@ describe 'Asciidoctor::PDF::Converter - Running Content' do end it 'should not attempt to add running content if document has no body' do - pdf = to_pdf <<~'EOS', attributes: { 'nofooter' => 'nil' }, analyze: true + pdf = to_pdf <<~'EOS', attributes: { 'nofooter' => nil }, analyze: true = Document Title :doctype: book EOS |
