From 7644a581c2e1a27da4c39e9518c0844e098f7301 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Wed, 26 Jul 2017 14:58:59 -0400 Subject: Check variant image properties directly --- test/controllers/variants_controller_test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/controllers') 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 -- cgit v1.2.3