diff options
author | Luke Melia <luke@lukemelia.com> | 2008-06-24 22:50:14 -0400 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-08-31 19:42:01 +0200 |
commit | 7ce03db77884e21256ba8f1615ad8dd841b76b86 (patch) | |
tree | e6c957767638217305ac10a910074e57aab70571 /actionpack/test/controller | |
parent | 086c3520c47c6c001b3ddbba8881b4175c433ed1 (diff) | |
download | rails-7ce03db77884e21256ba8f1615ad8dd841b76b86.tar.gz rails-7ce03db77884e21256ba8f1615ad8dd841b76b86.tar.bz2 rails-7ce03db77884e21256ba8f1615ad8dd841b76b86.zip |
Fixes optimised named routes generating question mark followed by nothing when provided an empty hash as the last argument.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#481 state:committed]
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index f480e6dbe4..8bb1c49cbd 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1694,6 +1694,12 @@ uses_mocha 'LegacyRouteSet, Route, RouteSet and RouteLoading' do controller.send(:multi_url, 7, "hello", 5, :baz => "bar") end + def test_named_route_url_method_with_ordered_parameters_and_empty_hash + controller = setup_named_route_test + assert_equal "http://named.route.test/people/go/7/hello/joe/5", + controller.send(:multi_url, 7, "hello", 5, {}) + end + def test_named_route_url_method_with_no_positional_arguments controller = setup_named_route_test assert_equal "http://named.route.test/people?baz=bar", |