diff options
author | Yi Feng <yfxie@me.com> | 2019-04-20 18:05:58 +0800 |
---|---|---|
committer | Yi Feng <yfxie@me.com> | 2019-04-20 18:05:58 +0800 |
commit | 6be1446fc7f4b159097533562920662b85155113 (patch) | |
tree | 66f89efe301dafd670527624794ca18fd4f8502c /activestorage/test | |
parent | 96cf7e0e676c54cb8177de146efa27ed49c4b8c6 (diff) | |
download | rails-6be1446fc7f4b159097533562920662b85155113.tar.gz rails-6be1446fc7f4b159097533562920662b85155113.tar.bz2 rails-6be1446fc7f4b159097533562920662b85155113.zip |
normalize the hash of transformations
Diffstat (limited to 'activestorage/test')
-rw-r--r-- | activestorage/test/models/variant_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activestorage/test/models/variant_test.rb b/activestorage/test/models/variant_test.rb index d98935eb9f..f6fa0e7afa 100644 --- a/activestorage/test/models/variant_test.rb +++ b/activestorage/test/models/variant_test.rb @@ -4,6 +4,14 @@ require "test_helper" require "database/setup" class ActiveStorage::VariantTest < ActiveSupport::TestCase + test "variations have the same key for different types of the same transformation" do + blob = create_file_blob(filename: "racecar.jpg") + variant_a = blob.variant(resize: "100x100") + variant_b = blob.variant("resize" => "100x100") + + assert_equal variant_a.key, variant_b.key + end + test "resized variation of JPEG blob" do blob = create_file_blob(filename: "racecar.jpg") variant = blob.variant(resize: "100x100").processed |