diff options
author | Koichi ITO <koic.ito@gmail.com> | 2017-08-14 22:17:50 +0900 |
---|---|---|
committer | Koichi ITO <koic.ito@gmail.com> | 2017-08-14 22:17:50 +0900 |
commit | 2b6e85c1900138d8f1b07575abf187e4a8aee502 (patch) | |
tree | d292bb65702834da2160144e0724926bbc7c10bc /activestorage/test | |
parent | 57585b6f3b8ef1703970c858ba6297e6427be0bd (diff) | |
download | rails-2b6e85c1900138d8f1b07575abf187e4a8aee502.tar.gz rails-2b6e85c1900138d8f1b07575abf187e4a8aee502.tar.bz2 rails-2b6e85c1900138d8f1b07575abf187e4a8aee502.zip |
Should escape regexp wildcard character `.`
Diffstat (limited to 'activestorage/test')
-rw-r--r-- | activestorage/test/controllers/blobs_controller_test.rb | 2 | ||||
-rw-r--r-- | activestorage/test/controllers/variants_controller_test.rb | 2 | ||||
-rw-r--r-- | activestorage/test/models/variant_test.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/activestorage/test/controllers/blobs_controller_test.rb b/activestorage/test/controllers/blobs_controller_test.rb index d682893e1d..c37b9c8a10 100644 --- a/activestorage/test/controllers/blobs_controller_test.rb +++ b/activestorage/test/controllers/blobs_controller_test.rb @@ -11,7 +11,7 @@ class ActiveStorage::BlobsControllerTest < ActionDispatch::IntegrationTest test "showing blob utilizes browser caching" do get rails_blob_url(@blob) - assert_redirected_to(/racecar.jpg/) + assert_redirected_to(/racecar\.jpg/) assert_equal "max-age=300, private", @response.headers["Cache-Control"] end end diff --git a/activestorage/test/controllers/variants_controller_test.rb b/activestorage/test/controllers/variants_controller_test.rb index d9a85e16d9..0a049f3bc4 100644 --- a/activestorage/test/controllers/variants_controller_test.rb +++ b/activestorage/test/controllers/variants_controller_test.rb @@ -14,7 +14,7 @@ class ActiveStorage::VariantsControllerTest < ActionDispatch::IntegrationTest signed_blob_id: @blob.signed_id, variation_key: ActiveStorage::Variation.encode(resize: "100x100")) - assert_redirected_to(/racecar.jpg\?.*disposition=inline/) + assert_redirected_to(/racecar\.jpg\?.*disposition=inline/) image = read_image_variant(@blob.variant(resize: "100x100")) assert_equal 100, image.width 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 |