aboutsummaryrefslogtreecommitdiffstats
path: root/test/controllers
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2017-07-26 14:58:59 -0400
committerGeorge Claghorn <george@basecamp.com>2017-07-26 14:58:59 -0400
commit7644a581c2e1a27da4c39e9518c0844e098f7301 (patch)
tree0082702bd28853f0aedcd4b2338b611c1fa43bf7 /test/controllers
parent0605ed9a8e71d75a80e0337602bd19c99c869ad8 (diff)
downloadrails-7644a581c2e1a27da4c39e9518c0844e098f7301.tar.gz
rails-7644a581c2e1a27da4c39e9518c0844e098f7301.tar.bz2
rails-7644a581c2e1a27da4c39e9518c0844e098f7301.zip
Check variant image properties directly
Diffstat (limited to 'test/controllers')
-rw-r--r--test/controllers/variants_controller_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/controllers/variants_controller_test.rb b/test/controllers/variants_controller_test.rb
index 83b00a132f..ec8103718b 100644
--- a/test/controllers/variants_controller_test.rb
+++ b/test/controllers/variants_controller_test.rb
@@ -18,6 +18,9 @@ class ActiveStorage::VariantsControllerTest < ActionController::TestCase
variation_key: ActiveStorage::Variation.encode(resize: "100x100") }
assert_redirected_to /racecar.jpg\?disposition=inline/
- assert_equal_image_dimensions "racecar-100x100.jpg", @blob.variant(resize: "100x100")
+
+ image = read_image_variant(@blob.variant(resize: "100x100"))
+ assert_equal 100, image.width
+ assert_equal 67, image.height
end
end