aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing
diff options
context:
space:
mode:
authorAndrew White <andrew.white@unboxedconsulting.com>2016-02-23 09:59:33 +0000
committerAndrew White <andrew.white@unboxed.co>2017-02-21 15:30:46 +0000
commit47a27e8950ad00654e2ba0420cefd87269e08055 (patch)
tree834c9e96547fd2da97a9c4b535c7eb856653af49 /actionpack/test/dispatch/routing
parentce7d5fb2e6ffa9ec323510aaff51f10b15f1649a (diff)
downloadrails-47a27e8950ad00654e2ba0420cefd87269e08055.tar.gz
rails-47a27e8950ad00654e2ba0420cefd87269e08055.tar.bz2
rails-47a27e8950ad00654e2ba0420cefd87269e08055.zip
Rename url_helper to direct
Diffstat (limited to 'actionpack/test/dispatch/routing')
-rw-r--r--actionpack/test/dispatch/routing/custom_url_helpers_test.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/actionpack/test/dispatch/routing/custom_url_helpers_test.rb b/actionpack/test/dispatch/routing/custom_url_helpers_test.rb
index ec0484a3ba..a55ee8e9b0 100644
--- a/actionpack/test/dispatch/routing/custom_url_helpers_test.rb
+++ b/actionpack/test/dispatch/routing/custom_url_helpers_test.rb
@@ -30,14 +30,14 @@ class TestCustomUrlHelpers < ActionDispatch::IntegrationTest
get "/dashboard", to: "dashboard#index"
end
- url_helper(:website) { "http://www.rubyonrails.org" }
- url_helper(:linkable) { |linkable| [:"#{linkable.linkable_type}", { id: linkable.id }] }
- url_helper(:params) { |params| params }
- url_helper(:symbol) { :basket }
- url_helper(:hash) { { controller: "basket", action: "show" } }
- url_helper(:array) { [:admin, :dashboard] }
- url_helper(:options) { |options| [:products, options] }
- url_helper(:defaults, size: 10) { |options| [:products, options] }
+ direct(:website) { "http://www.rubyonrails.org" }
+ direct(:linkable) { |linkable| [:"#{linkable.linkable_type}", { id: linkable.id }] }
+ direct(:params) { |params| params }
+ direct(:symbol) { :basket }
+ direct(:hash) { { controller: "basket", action: "show" } }
+ direct(:array) { [:admin, :dashboard] }
+ direct(:options) { |options| [:products, options] }
+ direct(:defaults, size: 10) { |options| [:products, options] }
end
APP = build_app Routes
@@ -57,7 +57,7 @@ class TestCustomUrlHelpers < ActionDispatch::IntegrationTest
@safe_params = ActionController::Parameters.new(@path_params).permit(:controller, :action)
end
- def test_custom_path_helper
+ def test_direct_paths
assert_equal "http://www.rubyonrails.org", website_path
assert_equal "http://www.rubyonrails.org", Routes.url_helpers.website_path
@@ -88,7 +88,7 @@ class TestCustomUrlHelpers < ActionDispatch::IntegrationTest
assert_equal "/products?size=20", Routes.url_helpers.defaults_path(size: 20)
end
- def test_custom_url_helper
+ def test_direct_urls
assert_equal "http://www.rubyonrails.org", website_url
assert_equal "http://www.rubyonrails.org", Routes.url_helpers.website_url
@@ -108,8 +108,8 @@ class TestCustomUrlHelpers < ActionDispatch::IntegrationTest
assert_equal "http://www.example.com/basket", Routes.url_helpers.symbol_url
assert_equal "http://www.example.com/basket", hash_url
assert_equal "http://www.example.com/basket", Routes.url_helpers.hash_url
- assert_equal "/admin/dashboard", array_path
- assert_equal "/admin/dashboard", Routes.url_helpers.array_path
+ assert_equal "http://www.example.com/admin/dashboard", array_url
+ assert_equal "http://www.example.com/admin/dashboard", Routes.url_helpers.array_url
assert_equal "http://www.example.com/products?page=2", options_url(page: 2)
assert_equal "http://www.example.com/products?page=2", Routes.url_helpers.options_url(page: 2)