summaryrefslogtreecommitdiffhomepage
path: root/test/drawing
diff options
context:
space:
mode:
authorEdgars Beigarts <[email protected]>2015-02-11 13:15:40 +0200
committerEdgars Beigarts <[email protected]>2015-02-11 13:37:01 +0200
commite71164242ff4012a1ebbae75300a3527b1fc84a0 (patch)
tree7bf9bdebe15cd2f16b3b2d32cee70c124da0675a /test/drawing
parentc24ec92ab6495b6b0c36e8e139d3d3ce350fc5c5 (diff)
downloadcaxlsx-e71164242ff4012a1ebbae75300a3527b1fc84a0.tar.gz
caxlsx-e71164242ff4012a1ebbae75300a3527b1fc84a0.zip
Fix content types for uppercased image file extensions
Diffstat (limited to 'test/drawing')
-rw-r--r--test/drawing/tc_pic.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/drawing/tc_pic.rb b/test/drawing/tc_pic.rb
index b8bd2c36..3cea49c0 100644
--- a/test/drawing/tc_pic.rb
+++ b/test/drawing/tc_pic.rb
@@ -79,6 +79,10 @@ class TestPic < Test::Unit::TestCase
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