aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_json_test.rb
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2015-02-01 16:07:42 +0300
committerKir Shatrov <shatrov@me.com>2015-02-01 16:07:42 +0300
commitb19999f3a7c39fc1a959cc3c39575014d0fd2835 (patch)
tree30eca90db38b5744671b15b24e267fba589aa314 /actionpack/test/controller/render_json_test.rb
parent33030ea7cbfa026b0f9f95a2c5d2dd363a7fe6aa (diff)
downloadrails-b19999f3a7c39fc1a959cc3c39575014d0fd2835.tar.gz
rails-b19999f3a7c39fc1a959cc3c39575014d0fd2835.tar.bz2
rails-b19999f3a7c39fc1a959cc3c39575014d0fd2835.zip
Migrating xhr methods to keyword arguments syntax
in `ActionController::TestCase` and `ActionDispatch::Integration` Old syntax: `xhr :get, :create, params: { id: 1 }` New syntax example: `get :create, params: { id: 1 }, xhr: true`
Diffstat (limited to 'actionpack/test/controller/render_json_test.rb')
-rw-r--r--actionpack/test/controller/render_json_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/controller/render_json_test.rb b/actionpack/test/controller/render_json_test.rb
index ada978aa11..b1ad16bc55 100644
--- a/actionpack/test/controller/render_json_test.rb
+++ b/actionpack/test/controller/render_json_test.rb
@@ -100,13 +100,13 @@ class RenderJsonTest < ActionController::TestCase
end
def test_render_json_with_callback
- xhr :get, :render_json_hello_world_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
end
def test_render_json_with_custom_content_type
- xhr :get, :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
end