aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_json_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/render_json_test.rb')
-rw-r--r--actionpack/test/controller/render_json_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/test/controller/render_json_test.rb b/actionpack/test/controller/render_json_test.rb
index 82c1ba26cb..aba7593c15 100644
--- a/actionpack/test/controller/render_json_test.rb
+++ b/actionpack/test/controller/render_json_test.rb
@@ -80,7 +80,7 @@ class RenderJsonTest < ActionController::TestCase
def test_render_json_nil
get :render_json_nil
assert_equal "null", @response.body
- assert_equal "application/json", @response.content_type
+ assert_equal "application/json", @response.media_type
end
def test_render_json_render_to_string
@@ -91,7 +91,7 @@ class RenderJsonTest < ActionController::TestCase
def test_render_json
get :render_json_hello_world
assert_equal '{"hello":"world"}', @response.body
- assert_equal "application/json", @response.content_type
+ assert_equal "application/json", @response.media_type
end
def test_render_json_with_status
@@ -103,31 +103,31 @@ class RenderJsonTest < ActionController::TestCase
def test_render_json_with_callback
get :render_json_hello_world_with_callback, xhr: true
assert_equal '/**/alert({"hello":"world"})', @response.body
- assert_equal "text/javascript", @response.content_type
+ assert_equal "text/javascript", @response.media_type
end
def test_render_json_with_custom_content_type
get :render_json_with_custom_content_type, xhr: true
assert_equal '{"hello":"world"}', @response.body
- assert_equal "text/javascript", @response.content_type
+ assert_equal "text/javascript", @response.media_type
end
def test_render_symbol_json
get :render_symbol_json
assert_equal '{"hello":"world"}', @response.body
- assert_equal "application/json", @response.content_type
+ assert_equal "application/json", @response.media_type
end
def test_render_json_with_render_to_string
get :render_json_with_render_to_string
assert_equal '{"hello":"partial html"}', @response.body
- assert_equal "application/json", @response.content_type
+ assert_equal "application/json", @response.media_type
end
def test_render_json_forwards_extra_options
get :render_json_with_extra_options
assert_equal '{"a":"b"}', @response.body
- assert_equal "application/json", @response.content_type
+ assert_equal "application/json", @response.media_type
end
def test_render_json_calls_to_json_from_object