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.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activestorage/test/models/variant_test.rb b/activestorage/test/models/variant_test.rb
index 2a96dfb142..7157bfac3a 100644
--- a/activestorage/test/models/variant_test.rb
+++ b/activestorage/test/models/variant_test.rb
@@ -50,6 +50,14 @@ class ActiveStorage::VariantTest < ActiveSupport::TestCase
assert_equal 20, image.height
end
+ test "optimized variation of GIF blob" do
+ blob = create_file_blob(filename: "image.gif", content_type: "image/gif")
+
+ assert_nothing_raised do
+ blob.variant(layers: "Optimize").processed
+ end
+ end
+
test "variation of invariable blob" do
assert_raises ActiveStorage::Blob::InvariableError do
create_file_blob(filename: "report.pdf", content_type: "application/pdf").variant(resize: "100x100")