aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/url_helper_test.rb
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2015-01-31 21:54:33 +0530
committerVipul A M <vipulnsward@gmail.com>2015-01-31 21:54:33 +0530
commitdd6b0c2a3d2fdb1eaa7b931af2b87ae42ea27c63 (patch)
treea8d74f2ddd1b2fd0893e737096ad8cd3cb94ff2f /actionview/test/template/url_helper_test.rb
parent33030ea7cbfa026b0f9f95a2c5d2dd363a7fe6aa (diff)
downloadrails-dd6b0c2a3d2fdb1eaa7b931af2b87ae42ea27c63.tar.gz
rails-dd6b0c2a3d2fdb1eaa7b931af2b87ae42ea27c63.tar.bz2
rails-dd6b0c2a3d2fdb1eaa7b931af2b87ae42ea27c63.zip
Fixed test for deprecation warning in actionview, renaming from https://github.com/rails/rails/commit/baf14ae513337cb185acf865e93dfc48f3aabf6a
Diffstat (limited to 'actionview/test/template/url_helper_test.rb')
-rw-r--r--actionview/test/template/url_helper_test.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/actionview/test/template/url_helper_test.rb b/actionview/test/template/url_helper_test.rb
index 0d6f31af9b..0ce9d38fa3 100644
--- a/actionview/test/template/url_helper_test.rb
+++ b/actionview/test/template/url_helper_test.rb
@@ -624,13 +624,13 @@ class UrlHelperControllerTest < ActionController::TestCase
end
def test_named_route_url_shows_host_and_path
- get :show_named_route, kind: 'url'
+ get :show_named_route, params: { kind: 'url' }
assert_equal 'http://test.host/url_helper_controller_test/url_helper/show_named_route',
@response.body
end
def test_named_route_path_shows_only_path
- get :show_named_route, kind: 'path'
+ get :show_named_route, params: { kind: 'path' }
assert_equal '/url_helper_controller_test/url_helper/show_named_route', @response.body
end
@@ -646,7 +646,7 @@ class UrlHelperControllerTest < ActionController::TestCase
end
end
- get :show_named_route, kind: 'url'
+ get :show_named_route, params: { kind: 'url' }
assert_equal 'http://testtwo.host/url_helper_controller_test/url_helper/show_named_route', @response.body
end
@@ -661,11 +661,11 @@ class UrlHelperControllerTest < ActionController::TestCase
end
def test_recall_params_should_normalize_id
- get :show, id: '123'
+ get :show, params: { id: '123' }
assert_equal 302, @response.status
assert_equal 'http://test.host/url_helper_controller_test/url_helper/profile/123', @response.location
- get :show, name: '123'
+ get :show, params: { name: '123' }
assert_equal 'ok', @response.body
end
@@ -704,7 +704,7 @@ class LinkToUnlessCurrentWithControllerTest < ActionController::TestCase
end
def test_link_to_unless_current_shows_link
- get :show, id: 1
+ get :show, params: { id: 1 }
assert_equal %{<a href="/tasks">tasks</a>\n} +
%{<a href="#{@request.protocol}#{@request.host_with_port}/tasks">tasks</a>},
@response.body
@@ -778,21 +778,21 @@ class PolymorphicControllerTest < ActionController::TestCase
def test_existing_resource
@controller = WorkshopsController.new
- get :show, id: 1
+ get :show, params: { id: 1 }
assert_equal %{/workshops/1\n<a href="/workshops/1">Workshop</a>}, @response.body
end
def test_new_nested_resource
@controller = SessionsController.new
- get :index, workshop_id: 1
+ get :index, params: { workshop_id: 1 }
assert_equal %{/workshops/1/sessions\n<a href="/workshops/1/sessions">Session</a>}, @response.body
end
def test_existing_nested_resource
@controller = SessionsController.new
- get :show, workshop_id: 1, id: 1
+ get :show, params: { workshop_id: 1, id: 1 }
assert_equal %{/workshops/1/sessions/1\n<a href="/workshops/1/sessions/1">Session</a>}, @response.body
end
end