Fix assertion for Ruby 1.8.7

This commit is contained in:
Jo Liss 2012-09-21 16:41:27 +02:00
parent 646d57c438
commit 0a5d3eb953

View File

@ -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