diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-05-02 03:21:40 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-05-02 03:21:40 -0300 |
commit | 5e790d368c5d0e89cfd5ef1245e4b131be63716f (patch) | |
tree | fe26ed0a2b3056dd67fe46558abd96712cef67d5 /actionpack/test/controller/resources_test.rb | |
parent | 9f36431f58c406312d0b0317543b7f69107e61e9 (diff) | |
parent | 3be3470fab788856b4559742434f195cc6b1009a (diff) | |
download | rails-5e790d368c5d0e89cfd5ef1245e4b131be63716f.tar.gz rails-5e790d368c5d0e89cfd5ef1245e4b131be63716f.tar.bz2 rails-5e790d368c5d0e89cfd5ef1245e4b131be63716f.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/controller/resources_test.rb')
-rw-r--r-- | actionpack/test/controller/resources_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index c807e71cd7..30ab110ef7 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -120,6 +120,14 @@ class ResourcesTest < ActionController::TestCase end end + def test_irregular_id_requirements_should_get_passed_to_member_actions + expected_options = {:controller => 'messages', :action => 'custom', :id => '1.1.1'} + + with_restful_routing(:messages, :member => {:custom => :get}, :requirements => {:id => /[0-9]\.[0-9]\.[0-9]/}) do + assert_recognizes(expected_options, :path => 'messages/1.1.1/custom', :method => :get) + end + end + def test_with_path_prefix with_restful_routing :messages, :path_prefix => '/thread/:thread_id' do assert_simply_restful_for :messages, :path_prefix => 'thread/5/', :options => { :thread_id => '5' } |