diff options
author | Ryan McGeary <ryan@mcgeary.org> | 2012-02-07 11:56:26 -0500 |
---|---|---|
committer | Ryan McGeary <ryan@mcgeary.org> | 2012-02-07 13:28:30 -0500 |
commit | 30e5503d004971a8c7ddb039f9023dca3a6bdcd7 (patch) | |
tree | 9866451e41e9562a51bdc91f732794d7db979d6c /actionpack/test | |
parent | 6efb849b32f672d9c26f36d2c823b134f49bd892 (diff) | |
download | rails-30e5503d004971a8c7ddb039f9023dca3a6bdcd7.tar.gz rails-30e5503d004971a8c7ddb039f9023dca3a6bdcd7.tar.bz2 rails-30e5503d004971a8c7ddb039f9023dca3a6bdcd7.zip |
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
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/base_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index 70e03d24ea..791edb9069 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -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 |