aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/models/variant_test.rb
diff options
context:
space:
mode:
authorKoichi ITO <koic.ito@gmail.com>2017-08-14 22:17:50 +0900
committerKoichi ITO <koic.ito@gmail.com>2017-08-14 22:17:50 +0900
commit2b6e85c1900138d8f1b07575abf187e4a8aee502 (patch)
treed292bb65702834da2160144e0724926bbc7c10bc /activestorage/test/models/variant_test.rb
parent57585b6f3b8ef1703970c858ba6297e6427be0bd (diff)
downloadrails-2b6e85c1900138d8f1b07575abf187e4a8aee502.tar.gz
rails-2b6e85c1900138d8f1b07575abf187e4a8aee502.tar.bz2
rails-2b6e85c1900138d8f1b07575abf187e4a8aee502.zip
Should escape regexp wildcard character `.`
Diffstat (limited to 'activestorage/test/models/variant_test.rb')
-rw-r--r--activestorage/test/models/variant_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activestorage/test/models/variant_test.rb b/activestorage/test/models/variant_test.rb
index f4e1e9e51d..ca112ab907 100644
--- a/activestorage/test/models/variant_test.rb
+++ b/activestorage/test/models/variant_test.rb
@@ -10,7 +10,7 @@ class ActiveStorage::VariantTest < ActiveSupport::TestCase
test "resized variation" do
variant = @blob.variant(resize: "100x100").processed
- assert_match(/racecar.jpg/, variant.service_url)
+ assert_match(/racecar\.jpg/, variant.service_url)
image = read_image_variant(variant)
assert_equal 100, image.width
@@ -19,7 +19,7 @@ class ActiveStorage::VariantTest < ActiveSupport::TestCase
test "resized and monochrome variation" do
variant = @blob.variant(resize: "100x100", monochrome: true).processed
- assert_match(/racecar.jpg/, variant.service_url)
+ assert_match(/racecar\.jpg/, variant.service_url)
image = read_image_variant(variant)
assert_equal 100, image.width