aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/response_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-09-21 12:04:02 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-09-21 12:04:12 -0700
commite4ba720c17cb141babfbffec60db34b745fd5637 (patch)
tree531f5f408d0547b872c330f2ea3824534efa3db0 /actionpack/test/dispatch/response_test.rb
parentefc6dd550ee49e7e443f9d72785caa0f240def53 (diff)
downloadrails-e4ba720c17cb141babfbffec60db34b745fd5637.tar.gz
rails-e4ba720c17cb141babfbffec60db34b745fd5637.tar.bz2
rails-e4ba720c17cb141babfbffec60db34b745fd5637.zip
stop calling deprecated methods
We should be asking the mime type method for the mime objects rather than via const lookup
Diffstat (limited to 'actionpack/test/dispatch/response_test.rb')
-rw-r--r--actionpack/test/dispatch/response_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb
index 5d74424de7..8f4ba75842 100644
--- a/actionpack/test/dispatch/response_test.rb
+++ b/actionpack/test/dispatch/response_test.rb
@@ -178,13 +178,13 @@ class ResponseTest < ActiveSupport::TestCase
test "read charset and content type" do
resp = ActionDispatch::Response.new.tap { |response|
response.charset = 'utf-16'
- response.content_type = Mime::XML
+ response.content_type = Mime::Type[:XML]
response.body = 'Hello'
}
resp.to_a
assert_equal('utf-16', resp.charset)
- assert_equal(Mime::XML, resp.content_type)
+ assert_equal(Mime::Type[:XML], resp.content_type)
assert_equal('application/xml; charset=utf-16', resp.headers['Content-Type'])
end
@@ -317,7 +317,7 @@ class ResponseIntegrationTest < ActionDispatch::IntegrationTest
@app = lambda { |env|
ActionDispatch::Response.new.tap { |resp|
resp.charset = 'utf-16'
- resp.content_type = Mime::XML
+ resp.content_type = Mime::Type[:XML]
resp.body = 'Hello'
}.to_a
}
@@ -326,7 +326,7 @@ class ResponseIntegrationTest < ActionDispatch::IntegrationTest
assert_response :success
assert_equal('utf-16', @response.charset)
- assert_equal(Mime::XML, @response.content_type)
+ assert_equal(Mime::Type[:XML], @response.content_type)
assert_equal('application/xml; charset=utf-16', @response.headers['Content-Type'])
end
@@ -342,7 +342,7 @@ class ResponseIntegrationTest < ActionDispatch::IntegrationTest
assert_response :success
assert_equal('utf-16', @response.charset)
- assert_equal(Mime::XML, @response.content_type)
+ assert_equal(Mime::Type[:XML], @response.content_type)
assert_equal('application/xml; charset=utf-16', @response.headers['Content-Type'])
end