diff options
author | Anton Khamets <colorfulfool@gmail.com> | 2017-07-26 20:51:02 +0400 |
---|---|---|
committer | George Claghorn <george.claghorn@gmail.com> | 2017-07-26 12:51:02 -0400 |
commit | 6ec6d223400142faf925aa84a15805d8329c4d74 (patch) | |
tree | b5935077ed71bf8856c62e47ea1b86ecd2ff985e /test/models | |
parent | 5492c4efa9d869f207ea702d0b328f26c047b75c (diff) | |
download | rails-6ec6d223400142faf925aa84a15805d8329c4d74.tar.gz rails-6ec6d223400142faf925aa84a15805d8329c4d74.tar.bz2 rails-6ec6d223400142faf925aa84a15805d8329c4d74.zip |
Compare images by selected attributes (size, colorspace)
Diffstat (limited to 'test/models')
-rw-r--r-- | test/models/variant_test.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/models/variant_test.rb b/test/models/variant_test.rb index 9a33d77379..3d890dfc0f 100644 --- a/test/models/variant_test.rb +++ b/test/models/variant_test.rb @@ -7,20 +7,17 @@ class ActiveStorage::VariantTest < ActiveSupport::TestCase end test "resized variation" do - skip - variant = @blob.variant(resize: "100x100").processed assert_match /racecar.jpg/, variant.service_url - assert_same_image "racecar-100x100.jpg", variant + assert_equal_image_dimensions "racecar-100x100.jpg", variant end test "resized and monochrome variation" do - skip - variant = @blob.variant(resize: "100x100", monochrome: true).processed assert_match /racecar.jpg/, variant.service_url - assert_same_image "racecar-100x100-monochrome.jpg", variant + assert_equal_image_dimensions "racecar-100x100-monochrome.jpg", variant + assert_equal_image_colorspace "racecar-100x100-monochrome.jpg", variant end end |