1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added unit test to cover changes to RouteSet.url_for

ActionDispatch::Routing::RouteSet.url_for now handles passing params through to
ActionDispatch::Http::Url.url_for

Conflicts:

	actionpack/test/controller/base_test.rb
This commit is contained in:
Ryan McGeary 2012-02-07 11:56:26 -05:00
parent 6efb849b32
commit 30e5503d00

View file

@ -158,6 +158,22 @@ class UrlOptionsTest < ActionController::TestCase
rescue_action_in_public!
end
def test_url_for_query_params_included
rs = ActionDispatch::Routing::RouteSet.new
rs.draw do
match 'home' => 'pages#home'
end
options = {
:action => "home",
:controller => "pages",
:only_path => true,
:params => { "token" => "secret" }
}
assert_equal '/home?token=secret', rs.url_for(options)
end
def test_url_options_override
with_routing do |set|
set.draw do