test/drawing/tc_pic.rb in axlsx-2.0.1 vs test/drawing/tc_pic.rb in axlsx-2.1.0.pre
- old
+ new
@@ -77,9 +77,13 @@
assert_equal(@image.image_src, @test_img)
end
def test_image_src_downcase
assert_nothing_raised { @image.image_src = @test_img_up }
+ ct = @p.send(:content_types).detect do |t|
+ t.respond_to?(:extension) && t.extension.downcase == @image.extname.downcase
+ end
+ assert_equal("image/jpeg", ct.content_type)
end
def test_descr
assert_raise(ArgumentError) { @image.descr = 49 }
assert_nothing_raised { @image.descr = "test" }