test/drawing/tc_drawing.rb in axlsx-1.1.5 vs test/drawing/tc_drawing.rb in axlsx-1.1.6

- old
+ new

@@ -30,10 +30,15 @@ assert(@ws.drawing.anchors.last.is_a?(Axlsx::OneCellAnchor)) assert(image.is_a?(Axlsx::Pic)) assert_equal(600, image.width) assert_equal(400, image.height) end - + def test_add_two_cell_anchor_image + src = File.dirname(__FILE__) + "/../../examples/image1.jpeg" + image = @ws.add_image(:image_src => src, :start_at=>[0,0], :end_at => [15,0]) + assert(@ws.drawing.anchors.last.is_a?(Axlsx::TwoCellAnchor)) + assert(image.is_a?(Axlsx::Pic)) + end def test_charts assert(@ws.drawing.charts.empty?) chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"bob", :start_at=>[0,0], :end_at=>[1,1]) assert_equal(@ws.drawing.charts.last, chart, "add chart is returned") chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"nancy", :start_at=>[1,5], :end_at=>[5,10])