aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-11-24 10:08:48 -0800
committerGodfrey Chan <godfreykfc@gmail.com>2014-11-24 10:08:48 -0800
commit81e0f010e88bc4eca1df0af51c5c0aae1bce4b48 (patch)
treeb88af089ada3ab086dc5999205e6206720708b73 /actionpack/test
parent48a88305876f1b73329d325d58c9eee9f10e972b (diff)
parent23b21f6182e36c05c6b2a240c0fb824ae828465e (diff)
downloadrails-81e0f010e88bc4eca1df0af51c5c0aae1bce4b48.tar.gz
rails-81e0f010e88bc4eca1df0af51c5c0aae1bce4b48.tar.bz2
rails-81e0f010e88bc4eca1df0af51c5c0aae1bce4b48.zip
Merge pull request #17725 from chancancode/deprecate_use_route
Deprecate use route
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/routing_test.rb2
-rw-r--r--actionpack/test/controller/test_case_test.rb4
-rw-r--r--actionpack/test/journey/router_test.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index aca9f03748..f46b32e019 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -1386,7 +1386,7 @@ class RouteSetTest < ActiveSupport::TestCase
url = controller.url_for({ :controller => "connection", :only_path => true })
assert_equal "/connection/connection", url
- url = controller.url_for({ :use_route => :family_connection,
+ url = controller.url_for({ :use_route => "family_connection",
:controller => "connection", :only_path => true })
assert_equal "/connection", url
end
diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb
index fdabad3abd..ba2ff7d12c 100644
--- a/actionpack/test/controller/test_case_test.rb
+++ b/actionpack/test/controller/test_case_test.rb
@@ -528,7 +528,7 @@ XML
get 'via_named_route', as: :a_named_route, to: 'test_case_test/test#test_uri'
end
- get :test_uri, use_route: :a_named_route
+ assert_deprecated { get :test_uri, use_route: :a_named_route }
assert_equal '/via_named_route', @response.body
end
end
@@ -798,7 +798,7 @@ module EngineControllerTests
with_routing do |set|
set.draw { mount Engine => '/foo' }
- get :index, use_route: :foo
+ assert_deprecated { get :index, use_route: :foo }
assert_equal @response.body, 'bar'
end
end
diff --git a/actionpack/test/journey/router_test.rb b/actionpack/test/journey/router_test.rb
index fbac86e8ca..19c61b5914 100644
--- a/actionpack/test/journey/router_test.rb
+++ b/actionpack/test/journey/router_test.rb
@@ -415,7 +415,7 @@ module ActionDispatch
def test_generate_with_name
path = Path::Pattern.from_string '/:controller(/:action)'
- @router.routes.add_route @app, path, {}, {}, {}
+ @router.routes.add_route @app, path, {}, {}, "tasks"
path, params = @formatter.generate(
"tasks",