diff options
author | Mike Gunderloy <MikeG1@larkfarm.com> | 2009-03-03 17:40:39 -0600 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2009-03-04 14:27:39 +1300 |
commit | ce56c5daa81d61a745b88220014a846a0eea46a4 (patch) | |
tree | 0ca83c0edc037e9d5db36fe9829791921adc756c /actionpack/test | |
parent | 9b1b88f09cf1498f04e1cd469d0d5ffccf2b93cc (diff) | |
download | rails-ce56c5daa81d61a745b88220014a846a0eea46a4.tar.gz rails-ce56c5daa81d61a745b88220014a846a0eea46a4.tar.bz2 rails-ce56c5daa81d61a745b88220014a846a0eea46a4.zip |
Allow routes with a trailing slash to be recognized
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2039 state:committed]
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/resources_test.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index ae2639d245..c441cfd4cf 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -750,9 +750,17 @@ class ResourcesTest < ActionController::TestCase end def test_with_path_segment - with_restful_routing :messages, :as => 'reviews' do - assert_simply_restful_for :messages, :as => 'reviews' + with_restful_routing :messages do + assert_simply_restful_for :messages + assert_recognizes({:controller => "messages", :action => "index"}, "/messages") + assert_recognizes({:controller => "messages", :action => "index"}, "/messages/") end + + with_restful_routing :messages, :as => 'reviews' do + assert_simply_restful_for :messages, :as => 'reviews' + assert_recognizes({:controller => "messages", :action => "index"}, "/reviews") + assert_recognizes({:controller => "messages", :action => "index"}, "/reviews/") + end end def test_multiple_with_path_segment_and_controller |