test/hexapdf/document/test_pages.rb in hexapdf-0.35.0 vs test/hexapdf/document/test_pages.rb in hexapdf-0.35.1
- old
+ new
@@ -15,24 +15,24 @@
end
describe "create" do
it "uses the defaults from the configuration for missing arguments" do
page = @doc.pages.create
- assert_equal([0, 0, 595, 842], page.box(:media).value)
+ assert_equal([0, 0, 595.275591, 841.889764], page.box(:media).value)
end
it "allows specifying a reference to a predefined page size" do
page = @doc.pages.create(media_box: :A3)
- assert_equal([0, 0, 842, 1191], page.box(:media).value)
+ assert_equal([0, 0, 841.889764, 1190.551181], page.box(:media).value)
end
it "allows specifying the orientation for a predefined page size" do
page = @doc.pages.create(media_box: :A4, orientation: :landscape)
- assert_equal([0, 0, 842, 595], page.box(:media).value)
+ assert_equal([0, 0, 841.889764, 595.275591], page.box(:media).value)
page = @doc.pages.create(orientation: :landscape)
- assert_equal([0, 0, 842, 595], page.box(:media).value)
+ assert_equal([0, 0, 841.889764, 595.275591], page.box(:media).value)
end
it "allows using a media box array" do
page = @doc.pages.create(media_box: [0, 0, 12, 24], orientation: :landscape)
assert_equal([0, 0, 12, 24], page.box(:media).value)
@@ -52,10 +52,10 @@
end
it "adds a new empty page with the given page format" do
page = @doc.pages.add(:A4, orientation: :landscape)
assert_same(page, @doc.pages[0])
- assert_equal([0, 0, 842, 595], @doc.pages[0].box(:media).value)
+ assert_equal([0, 0, 841.889764, 595.275591], @doc.pages[0].box(:media).value)
end
it "adds the given page to the end" do
page = @doc.pages.add
new_page = @doc.add({Type: :Page})