diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-11-09 21:54:50 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-11-09 21:54:50 -0600 |
commit | 763489ce064b92609634638c93022b6916976e4f (patch) | |
tree | 95cb2ff0c736f4b9cc164f0890ca9781550934e0 /actionpack/test/controller/routing_test.rb | |
parent | 1004fcb76761aa42ff18d8aa373614a41a259d3c (diff) | |
download | rails-763489ce064b92609634638c93022b6916976e4f.tar.gz rails-763489ce064b92609634638c93022b6916976e4f.tar.bz2 rails-763489ce064b92609634638c93022b6916976e4f.zip |
Add pending test for route generation with default param
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index bb0b9247f3..71ae17a418 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1645,6 +1645,22 @@ class RouteSetTest < ActiveSupport::TestCase assert_uri_equal '/foo?x=hello+world', default_route_set.generate({:controller => 'foo', :x => 'hello world'}) end + def test_generate_with_default_params + set.draw do |map| + map.connect 'dummy/page/:page', :controller => 'dummy' + map.connect 'dummy/dots/page.:page', :controller => 'dummy', :action => 'dots' + map.connect 'ibocorp/:page', :controller => 'ibocorp', + :requirements => { :page => /\d+/ }, + :defaults => { :page => 1 } + + map.connect ':controller/:action/:id' + end + + pending do + assert_equal '/ibocorp', set.generate({:controller => 'ibocorp', :page => 1}) + end + end + private def assert_uri_equal(expected, actual) assert_equal(sort_query_string_params(expected), sort_query_string_params(actual)) |