diff options
author | Aditya Kapoor <aditya.kapoor@vinsol.com> | 2015-01-28 17:23:30 +0530 |
---|---|---|
committer | Aditya Kapoor <aditya.kapoor@vinsol.com> | 2015-01-28 17:23:30 +0530 |
commit | 751f752b43873311f2fa929934a53fd4b81317f9 (patch) | |
tree | 07d3592e1b020edc8a1709920ea137d7b155761f /actionpack/test | |
parent | 71003d63b6e217625450b0942a7afb8d7d1d14d9 (diff) | |
download | rails-751f752b43873311f2fa929934a53fd4b81317f9.tar.gz rails-751f752b43873311f2fa929934a53fd4b81317f9.tar.bz2 rails-751f752b43873311f2fa929934a53fd4b81317f9.zip |
Deprecate *_via_redirect integration test methods
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 5c0651bd73..2c04d78215 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -52,33 +52,43 @@ class SessionTest < ActiveSupport::TestCase end def test_get_via_redirect - path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } - @session.expects(:request_via_redirect).with(:get, path, args, headers) - @session.get_via_redirect(path, args, headers) + assert_deprecated do + path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } + @session.expects(:request_via_redirect).with(:get, path, args, headers) + @session.get_via_redirect(path, args, headers) + end end def test_post_via_redirect - path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } - @session.expects(:request_via_redirect).with(:post, path, args, headers) - @session.post_via_redirect(path, args, headers) + assert_deprecated do + path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } + @session.expects(:request_via_redirect).with(:post, path, args, headers) + @session.post_via_redirect(path, args, headers) + end end def test_patch_via_redirect - path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } - @session.expects(:request_via_redirect).with(:patch, path, args, headers) - @session.patch_via_redirect(path, args, headers) + assert_deprecated do + path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } + @session.expects(:request_via_redirect).with(:patch, path, args, headers) + @session.patch_via_redirect(path, args, headers) + end end def test_put_via_redirect - path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } - @session.expects(:request_via_redirect).with(:put, path, args, headers) - @session.put_via_redirect(path, args, headers) + assert_deprecated do + path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } + @session.expects(:request_via_redirect).with(:put, path, args, headers) + @session.put_via_redirect(path, args, headers) + end end def test_delete_via_redirect - path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } - @session.expects(:request_via_redirect).with(:delete, path, args, headers) - @session.delete_via_redirect(path, args, headers) + assert_deprecated do + path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" } + @session.expects(:request_via_redirect).with(:delete, path, args, headers) + @session.delete_via_redirect(path, args, headers) + end end def test_get |