test/hexapdf/document/test_pages.rb in hexapdf-0.23.0 vs test/hexapdf/document/test_pages.rb in hexapdf-0.24.0

- old
+ new

@@ -70,9 +70,18 @@ assert_same(new_page, @doc.pages.insert(2, new_page)) assert_equal(new_page, @doc.pages.root[:Kids][2]) end end + describe "move" do + it "moves the page to the given index" do + first = @doc.pages.add + second = @doc.pages.add + @doc.pages.move(first, -1) + assert_equal([second, first], @doc.pages.each.to_a) + end + end + describe "delete" do it "deletes a given page" do page1 = @doc.pages.add page2 = @doc.pages.add