1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix "warning: ambiguous first argument; put parentheses or a space even after `/' operator"

This commit is contained in:
yuuji.yaginuma 2018-11-28 11:29:03 +09:00
parent 74c9f649a4
commit ac721c8552

View file

@ -41,7 +41,7 @@ if SERVICE_CONFIGURATIONS[:gcs]
url = @service.url(key, expires_in: 2.minutes, disposition: :inline, content_type: "text/html", filename: ActiveStorage::Filename.new("test.html"))
response = Net::HTTP.get_response(URI(url))
assert_equal "text/plain", response.content_type
assert_match /attachment;.*test.txt/, response["Content-Disposition"]
assert_match(/attachment;.*test.txt/, response["Content-Disposition"])
ensure
@service.delete key
end
@ -57,7 +57,7 @@ if SERVICE_CONFIGURATIONS[:gcs]
url = @service.url(key, expires_in: 2.minutes, disposition: :inline, content_type: "text/html", filename: ActiveStorage::Filename.new("test.html"))
response = Net::HTTP.get_response(URI(url))
assert_equal "text/plain", response.content_type
assert_match /inline;.*test.html/, response["Content-Disposition"]
assert_match(/inline;.*test.html/, response["Content-Disposition"])
ensure
@service.delete key
end
@ -74,7 +74,7 @@ if SERVICE_CONFIGURATIONS[:gcs]
response = Net::HTTP.get_response(URI(url))
assert_equal "text/plain", response.content_type
assert_match /inline;.*test.txt/, response["Content-Disposition"]
assert_match(/inline;.*test.txt/, response["Content-Disposition"])
ensure
@service.delete key
end