Skip to content

Commit

Permalink
add test for #1121
Browse files Browse the repository at this point in the history
  • Loading branch information
tomprats authored and mojavelinux committed Jan 24, 2022
1 parent 3a01dcf commit ad86699
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/prawn/document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ def self.format(string)
expect(pdf.instance_variable_get(:@background)).to eq(filename)
end
end

it 'retains the current margin and padding' do
initial_absolute_left = pdf.bounds.absolute_left

pdf.bounding_box [0, pdf.cursor], width: pdf.bounds.width do
pdf.bounds.move_past_bottom
end
pdf.indent 20 do
pdf.bounds.move_past_bottom
end

expect(pdf.bounds.absolute_left).to eq(initial_absolute_left)
end
end

describe '#float' do
Expand Down

0 comments on commit ad86699

Please sign in to comment.