diff options
| -rw-r--r-- | spec/running_content_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/running_content_spec.rb b/spec/running_content_spec.rb index 3cc7829f..11d278da 100644 --- a/spec/running_content_spec.rb +++ b/spec/running_content_spec.rb @@ -2219,6 +2219,20 @@ describe 'Asciidoctor::PDF::Converter - Running Content' do end end + it 'should warn if image cannot be embedded' do + pdf_theme = { + footer_font_color: '0000FF', + footer_columns: '=100%', + footer_recto_center_content: %(image:#{fixture_file 'broken.svg'}[]), + } + + (expect do + pdf = to_pdf 'body', analyze: true, pdf_theme: pdf_theme, enable_footer: true + footer_text = pdf.find_text font_color: '0000FF' + (expect footer_text).to be_empty + end).to log_message severity: :WARN, message: %(~could not embed image in running content: #{fixture_file 'broken.svg'}; Missing end tag for 'rect') + end + it 'should support data URI image', visual: true do image_data = File.binread fixture_file 'tux.png' encoded_image_data = Base64.strict_encode64 image_data |
