diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-07-28 00:57:57 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-10 01:36:00 -0300 |
commit | eb52e5d42fbdc9288925a402dcb3c5664d1125b7 (patch) | |
tree | 9c9d4bbf6955f0233feac2a3f36b9b958df16e18 /actionpack/lib/action_dispatch | |
parent | 9185b68cc652a113a85e29c8d6f7655f360cbedb (diff) | |
download | rails-eb52e5d42fbdc9288925a402dcb3c5664d1125b7.tar.gz rails-eb52e5d42fbdc9288925a402dcb3c5664d1125b7.tar.bz2 rails-eb52e5d42fbdc9288925a402dcb3c5664d1125b7.zip |
Remove deprecated `ActionDispatch::IntegrationTest#xml_http_request`
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 265459f79e..273fe92b2c 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -72,38 +72,6 @@ module ActionDispatch process_with_kwargs(:head, path, *args) end - # Performs an XMLHttpRequest request with the given parameters, mirroring - # an AJAX request made from JavaScript. - # - # The request_method is +:get+, +:post+, +:patch+, +:put+, +:delete+ or - # +:head+; the parameters are +nil+, a hash, or a url-encoded or multipart - # string; the headers are a hash. - # - # Example: - # - # xhr :get, '/feed', params: { since: 201501011400 } - def xml_http_request(request_method, path, *args) - if kwarg_request?(args) - params, headers, env = args.first.values_at(:params, :headers, :env) - else - params = args[0] - headers = args[1] - env = {} - - if params.present? || headers.present? - non_kwarg_request_warning - end - end - - ActiveSupport::Deprecation.warn(<<-MSG.strip_heredoc) - xhr and xml_http_request methods are deprecated in favor of - `get "/posts", xhr: true` and `post "/posts/1", xhr: true`. - MSG - - process(request_method, path, params: params, headers: headers, xhr: true) - end - alias xhr :xml_http_request - # Follow a single redirect response. If the last response was not a # redirect, an exception will be raised. Otherwise, the redirect is # performed on the location header. |