Ticket #8762: actionpack_test_patch_8762.diff
| File actionpack_test_patch_8762.diff, 1.0 kB (added by choonkeat, 9 months ago) |
|---|
-
actionpack/test/controller/render_test.rb
old new 209 209 210 210 def test_do_with_render_json 211 211 get :render_json_hello_world 212 assert_equal '{ hello: "world"}', @response.body212 assert_equal '{"hello": "world"}', @response.body 213 213 assert_equal 'application/json', @response.content_type 214 214 end 215 215 216 216 def test_do_with_render_json_with_callback 217 217 get :render_json_hello_world_with_callback 218 assert_equal 'alert({ hello: "world"})', @response.body218 assert_equal 'alert({"hello": "world"})', @response.body 219 219 assert_equal 'application/json', @response.content_type 220 220 end 221 221 222 222 def test_do_with_render_symbol_json 223 223 get :render_symbol_json 224 assert_equal '{ hello: "world"}', @response.body224 assert_equal '{"hello": "world"}', @response.body 225 225 assert_equal 'application/json', @response.content_type 226 226 end 227 227