aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/url_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/url_helper_test.rb')
-rw-r--r--actionpack/test/template/url_helper_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb
index a6fdf806a4..bc2548e06c 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -433,6 +433,10 @@ class UrlHelperControllerTest < ActionController::TestCase
match 'url_helper_controller_test/url_helper/normalize_recall_params',
:to => UrlHelperController.action(:normalize_recall),
:as => :normalize_recall_params
+
+ match '/url_helper_controller_test/url_helper/override_url_helper/default',
+ :to => 'url_helper_controller_test/url_helper#override_url_helper',
+ :as => :override_url_helper
end
def show
@@ -468,6 +472,15 @@ class UrlHelperControllerTest < ActionController::TestCase
end
def rescue_action(e) raise e end
+
+ def override_url_helper
+ render :inline => '<%= override_url_helper_path %>'
+ end
+
+ def override_url_helper_path
+ '/url_helper_controller_test/url_helper/override_url_helper/override'
+ end
+ helper_method :override_url_helper_path
end
tests UrlHelperController
@@ -527,6 +540,11 @@ class UrlHelperControllerTest < ActionController::TestCase
get :show, :name => '123'
assert_equal 'ok', @response.body
end
+
+ def test_url_helper_can_be_overriden
+ get :override_url_helper
+ assert_equal '/url_helper_controller_test/url_helper/override_url_helper/override', @response.body
+ end
end
class TasksController < ActionController::Base