diff --git a/test/serialization_test.rb b/test/serialization_test.rb index f2c1faea..d778de7b 100644 --- a/test/serialization_test.rb +++ b/test/serialization_test.rb @@ -214,7 +214,8 @@ class RenderJsonTest < ActionController::TestCase def test_render_json_with_callback get :render_json_hello_world_with_callback assert_equal 'alert({"hello":"world"})', @response.body - assert_match %r(application/json|text/javascript), @response.content_type + # For JSONP, Rails 3 uses application/json, but Rails 4 uses text/javascript + assert_match %r(application/json|text/javascript), @response.content_type.to_s end def test_render_json_with_custom_content_type