diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing/custom_url_helpers_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing/custom_url_helpers_test.rb b/actionpack/test/dispatch/routing/custom_url_helpers_test.rb index bf4b323cf0..22e8bbf21e 100644 --- a/actionpack/test/dispatch/routing/custom_url_helpers_test.rb +++ b/actionpack/test/dispatch/routing/custom_url_helpers_test.rb @@ -32,6 +32,7 @@ class TestCustomUrlHelpers < ActionDispatch::IntegrationTest direct(:website) { "http://www.rubyonrails.org" } direct("string") { "http://www.rubyonrails.org" } + direct(:helper) { basket_url } direct(:linkable) { |linkable| [:"#{linkable.linkable_type}", { id: linkable.id }] } direct(:params) { |params| params } direct(:symbol) { :basket } @@ -65,6 +66,9 @@ class TestCustomUrlHelpers < ActionDispatch::IntegrationTest assert_equal "http://www.rubyonrails.org", string_path assert_equal "http://www.rubyonrails.org", Routes.url_helpers.string_path + assert_equal "http://www.example.com/basket", helper_url + assert_equal "http://www.example.com/basket", Routes.url_helpers.helper_url + assert_equal "/categories/1", linkable_path(@category) assert_equal "/categories/1", Routes.url_helpers.linkable_path(@category) assert_equal "/collections/2", linkable_path(@collection) @@ -99,6 +103,9 @@ class TestCustomUrlHelpers < ActionDispatch::IntegrationTest assert_equal "http://www.rubyonrails.org", string_url assert_equal "http://www.rubyonrails.org", Routes.url_helpers.string_url + assert_equal "http://www.example.com/basket", helper_url + assert_equal "http://www.example.com/basket", Routes.url_helpers.helper_url + assert_equal "http://www.example.com/categories/1", linkable_url(@category) assert_equal "http://www.example.com/categories/1", Routes.url_helpers.linkable_url(@category) assert_equal "http://www.example.com/collections/2", linkable_url(@collection) |