aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/url_helper_test.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-04-21 01:33:48 -0300
committerJeremy Kemper <jeremy@bitsweat.net>2010-04-21 17:09:14 -0700
commit5c9c30ac65d25bd5a83d773739c2cd8fdd6da4d3 (patch)
tree684ba440c364c82de1f3f245b08dfb495a3b03b5 /actionpack/test/template/url_helper_test.rb
parent726b5d79845c0ef50db64e2991bfec4e108faf4d (diff)
downloadrails-5c9c30ac65d25bd5a83d773739c2cd8fdd6da4d3.tar.gz
rails-5c9c30ac65d25bd5a83d773739c2cd8fdd6da4d3.tar.bz2
rails-5c9c30ac65d25bd5a83d773739c2cd8fdd6da4d3.zip
url_for now works with HashWithIndifferentAccess ht jay [#4391 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/test/template/url_helper_test.rb')
-rw-r--r--actionpack/test/template/url_helper_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb
index 4474949749..314ed91fdd 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -421,6 +421,11 @@ class UrlHelperControllerTest < ActionController::TestCase
render :inline => "<%= url_for :controller => 'url_helper_controller_test/url_helper', :action => 'show_url_for' %>"
end
+ def show_overriden_url_for
+ params = { :controller => 'c', :action => 'a' }
+ render :inline => "<%= url_for params.merge(:controller => 'url_helper_controller_test/url_helper', :action => 'show_url_for') %>"
+ end
+
def show_named_route
render :inline => "<%= show_named_route_#{params[:kind]} %>"
end
@@ -439,6 +444,11 @@ class UrlHelperControllerTest < ActionController::TestCase
assert_equal '/url_helper_controller_test/url_helper/show_url_for', @response.body
end
+ def test_overriden_url_for_shows_only_path
+ get :show_overriden_url_for
+ assert_equal '/url_helper_controller_test/url_helper/show_url_for', @response.body
+ end
+
def test_named_route_url_shows_host_and_path
get :show_named_route, :kind => 'url'
assert_equal 'http://test.host/url_helper_controller_test/url_helper/show_named_route',