mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
Make test suite compatible with Rails 4
Rails 4 changes the JSONP content_type to text/javascript
This commit is contained in:
parent
dfcbc59061
commit
646d57c438
@ -214,7 +214,7 @@ class RenderJsonTest < ActionController::TestCase
|
|||||||
def test_render_json_with_callback
|
def test_render_json_with_callback
|
||||||
get :render_json_hello_world_with_callback
|
get :render_json_hello_world_with_callback
|
||||||
assert_equal 'alert({"hello":"world"})', @response.body
|
assert_equal 'alert({"hello":"world"})', @response.body
|
||||||
assert_equal 'application/json', @response.content_type
|
assert_match %r(application/json|text/javascript), @response.content_type
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_render_json_with_custom_content_type
|
def test_render_json_with_custom_content_type
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user