diff options
author | George Claghorn <george@basecamp.com> | 2019-04-21 16:07:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-21 16:07:54 -0400 |
commit | a89e9cccb21acb9181ee71cb57439e82587ba579 (patch) | |
tree | bcdd5f70d1a65cc0f99cb150e4d908b312f0e4c1 /activestorage/test | |
parent | 142a8b97ef4619cb991666fec86db5d387443ffc (diff) | |
parent | 6be1446fc7f4b159097533562920662b85155113 (diff) | |
download | rails-a89e9cccb21acb9181ee71cb57439e82587ba579.tar.gz rails-a89e9cccb21acb9181ee71cb57439e82587ba579.tar.bz2 rails-a89e9cccb21acb9181ee71cb57439e82587ba579.zip |
Merge pull request #36045 from yfxie/fix-normalize-the-hash-of-transformations
ActiveStorage - 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 92e3384042..6b43923159 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 |