aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/models/variant_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/test/models/variant_test.rb')
-rw-r--r--activestorage/test/models/variant_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/activestorage/test/models/variant_test.rb b/activestorage/test/models/variant_test.rb
index 012aee3cc9..d98935eb9f 100644
--- a/activestorage/test/models/variant_test.rb
+++ b/activestorage/test/models/variant_test.rb
@@ -133,6 +133,17 @@ class ActiveStorage::VariantTest < ActiveSupport::TestCase
assert_equal 20, image.height
end
+ test "resized variation of TIFF blob" do
+ blob = create_file_blob(filename: "racecar.tif")
+ variant = blob.variant(resize: "50x50").processed
+ assert_match(/racecar\.png/, variant.service_url)
+
+ image = read_image(variant)
+ assert_equal "PNG", image.type
+ assert_equal 50, image.width
+ assert_equal 33, image.height
+ end
+
test "optimized variation of GIF blob" do
blob = create_file_blob(filename: "image.gif", content_type: "image/gif")