diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-05-17 13:20:05 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-05-17 13:20:05 -0600 |
| commit | 7ad2e8bbd0074422337b9fef0943844b4bc1ed3c (patch) | |
| tree | acfbd8031ee56bbf4fe70fe694f67e84e38102e3 /spec | |
| parent | 2687b3d38f075320f453caf32414bce2d886b6f8 (diff) | |
don't apply border on block images to logo image on title page
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/title_page_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/title_page_spec.rb b/spec/title_page_spec.rb index 011273c0..e77d277a 100644 --- a/spec/title_page_spec.rb +++ b/spec/title_page_spec.rb @@ -184,6 +184,33 @@ describe 'Asciidoctor::PDF::Converter - Title Page' do (expect images[0].hash[:Height]).to be 240 end + it 'should not add border to raster logo image if border is specified for image block in theme' do + pdf_theme = { image_border_width: 1, image_border_color: '000000' } + pdf = to_pdf <<~'EOS', pdf_theme: pdf_theme, analyze: :line + = Document Title + :doctype: book + :title-logo-image: image:tux.png[] + + content + EOS + + (expect pdf.lines).to be_empty + end + + it 'should not add border to SVG logo image if border is specified for image block in theme' do + pdf_theme = { image_border_width: 1, image_border_color: '0000EE' } + pdf = to_pdf <<~'EOS', pdf_theme: pdf_theme, analyze: :line + = Document Title + :doctype: book + :title-logo-image: image:square.svg[] + + content + EOS + + image_border_lines = pdf.lines.select {|it| it[:color] == '0000EE' } + (expect image_border_lines).to be_empty + end + it 'should add remote logo specified by title-logo-image document attribute to title page' do with_local_webserver do |base_url| [%(#{base_url}/tux.png), %(image:#{base_url}/tux.png[])].each do |image_url| |
