diff options
author | Kir Shatrov <shatrov@me.com> | 2015-01-04 10:35:06 +0100 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2015-01-29 14:44:46 +0200 |
commit | baf14ae513337cb185acf865e93dfc48f3aabf6a (patch) | |
tree | 77235d82964272c8721a62ae046b16279d01f945 /actionpack/test/dispatch/url_generation_test.rb | |
parent | 069b72aaf04d2caef76f8e71f320716129f2d949 (diff) | |
download | rails-baf14ae513337cb185acf865e93dfc48f3aabf6a.tar.gz rails-baf14ae513337cb185acf865e93dfc48f3aabf6a.tar.bz2 rails-baf14ae513337cb185acf865e93dfc48f3aabf6a.zip |
Switch to kwargs in ActionController::TestCase and ActionDispatch::Integration
Non-kwargs requests are deprecated now.
Guides are updated as well.
`post url, nil, nil, { a: 'b' }` doesn't make sense.
`post url, params: { y: x }, session: { a: 'b' }` would be an explicit way to do the same
Diffstat (limited to 'actionpack/test/dispatch/url_generation_test.rb')
-rw-r--r-- | actionpack/test/dispatch/url_generation_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/url_generation_test.rb b/actionpack/test/dispatch/url_generation_test.rb index 8f79e7bf9a..3d7b6086ee 100644 --- a/actionpack/test/dispatch/url_generation_test.rb +++ b/actionpack/test/dispatch/url_generation_test.rb @@ -39,12 +39,12 @@ module TestUrlGeneration end test "the request's SCRIPT_NAME takes precedence over the route" do - get "/foo", {}, 'SCRIPT_NAME' => "/new", 'action_dispatch.routes' => Routes + get "/foo", headers: {'SCRIPT_NAME' => "/new", 'action_dispatch.routes' => Routes} assert_equal "/new/foo", response.body end test "the request's SCRIPT_NAME wraps the mounted app's" do - get '/new/bar/foo', {}, 'SCRIPT_NAME' => '/new', 'PATH_INFO' => '/bar/foo', 'action_dispatch.routes' => Routes + get '/new/bar/foo', headers: { 'SCRIPT_NAME' => '/new', 'PATH_INFO' => '/bar/foo', 'action_dispatch.routes' => Routes } assert_equal "/new/bar/foo", response.body end |