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

Fix "warning: Net::HTTPResponse#header is obsolete"

Ref: cc77a81129/lib/net/http/response.rb (L138-L155)
This commit is contained in:
yuuji.yaginuma 2018-06-17 21:35:07 +09:00
parent c0ce055b05
commit 38dbc8e2b8

View file

@ -44,7 +44,7 @@ if SERVICE_CONFIGURATIONS[:gcs]
url = @service.url(key, expires_in: 2.minutes, disposition: :inline, filename: ActiveStorage::Filename.new("test.txt"), content_type: "text/plain")
response = Net::HTTP.get_response(URI(url))
assert_equal "text/plain", response.header["Content-Type"]
assert_equal "text/plain", response.content_type
ensure
@service.delete key
end