Skip to content

Commit

Permalink
add negative test to verify no warnings from background SVG are propa…
Browse files Browse the repository at this point in the history
…gated
  • Loading branch information
mojavelinux committed Jun 23, 2021
1 parent 65d996a commit 95c4978
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,19 @@
(expect to_file).to visually_match 'page-background-image-svg-with-image-disabled.pdf'
end

# NOTE this is a negative test that should be reversed once support is added
it 'should not warn if background SVG has warnings', visual: true do
(expect do
to_file = to_pdf_file <<~'EOS', 'page-background-image-svg-faulty.pdf'
= Document Title
:page-background-image: image:faulty.svg[]
This page has a background image that is rather loud.
EOS
(expect to_file).to visually_match 'page-background-image-svg-scale-up.pdf'
end).to not_log_message
end

it 'should read local image relative to SVG', visual: true do
to_file = to_pdf_file <<~'EOS', 'page-background-image-svg-with-local-image.pdf'
:page-background-image: image:svg-with-local-image.svg[fit=none,pdfwidth=1cm,position=top]
Expand Down

0 comments on commit 95c4978

Please sign in to comment.