diff options
author | Jamis Buck <jamis@37signals.com> | 2007-03-26 19:02:19 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2007-03-26 19:02:19 +0000 |
commit | 777deb9d15791e137b200e96283ff03b075fd3dc (patch) | |
tree | 3dc9b490dcde83e5ee10fdc116ea14e27ce0d92c /actionpack/test/controller | |
parent | b0685e96845677d679e8a2b5d059d4768cdc9a90 (diff) | |
download | rails-777deb9d15791e137b200e96283ff03b075fd3dc.tar.gz rails-777deb9d15791e137b200e96283ff03b075fd3dc.tar.bz2 rails-777deb9d15791e137b200e96283ff03b075fd3dc.zip |
Make sure the expiry hash is built by comparing the to_param-ized values of each hash
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6465 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index defc64bba2..ec34f0d35e 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1793,7 +1793,14 @@ class RouteSetTest < Test::Unit::TestCase {:controller => 'post', :action => 'show', :parameter => 1} ) end - + + def test_expiry_determination_should_consider_values_with_to_param + set.draw { |map| map.connect 'projects/:project_id/:controller/:action' } + assert_equal '/projects/1/post/show', set.generate( + {:action => 'show', :project_id => 1}, + {:controller => 'post', :action => 'show', :project_id => '1'}) + end + def test_generate_all set.draw do |map| map.connect 'show_post/:id', :controller => 'post', :action => 'show' |