Skip to content

Commit

Permalink
Merge pull request #689 from jjculber/issue664
Browse files Browse the repository at this point in the history
Added image and no_image parameters.
  • Loading branch information
unixmonkey authored Oct 3, 2017
2 parents 2278a6d + 4f73310 commit a8c6915
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/wicked_pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ def parse_others(options)
:disable_smart_shrinking,
:use_xserver,
:no_background,
:images,
:no_images,
:no_stop_slow_scripts], '', :boolean)
end
r
Expand Down
5 changes: 5 additions & 0 deletions test/unit/wicked_pdf_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ def setup
assert_equal '--outline-depth 5', @wp.get_parsed_options(:outline => { :outline_depth => 5 }).strip
end

test 'should parse no_images option' do
assert_equal '--no-images', @wp.get_parsed_options(:no_images => true ).strip
assert_equal '--images', @wp.get_parsed_options(:images => true ).strip
end

test 'should parse margins options' do
[:top, :bottom, :left, :right].each do |o|
assert_equal "--margin-#{o} 12", @wp.get_parsed_options(:margin => { o => '12' }).strip
Expand Down

0 comments on commit a8c6915

Please sign in to comment.