diff options
author | Mike Gunderloy <MikeG1@larkfarm.com> | 2009-03-05 18:46:59 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-03-05 18:46:59 -0600 |
commit | 5b7527ca44521edf9782b3d7f449bf09a29267f2 (patch) | |
tree | 8b6f7eca846a0e8e17e36146d6576cc430552973 /actionpack/test/controller/resources_test.rb | |
parent | b1c989f28dd1d619f0e3e3ca1b894b686e517f2f (diff) | |
download | rails-5b7527ca44521edf9782b3d7f449bf09a29267f2.tar.gz rails-5b7527ca44521edf9782b3d7f449bf09a29267f2.tar.bz2 rails-5b7527ca44521edf9782b3d7f449bf09a29267f2.zip |
Failing test for routes with member & requirement [#2054 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
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 c441cfd4cf..fee41362c1 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -209,6 +209,14 @@ class ResourcesTest < ActionController::TestCase end end + def test_with_member_action_and_requirement + expected_options = {:controller => 'messages', :action => 'mark', :id => '1.1.1'} + + with_restful_routing(:messages, :requirements => {:id => /[0-9]\.[0-9]\.[0-9]/}, :member => { :mark => :get }) do + assert_recognizes(expected_options, :path => 'messages/1.1.1/mark', :method => :get) + end + end + def test_member_when_override_paths_for_default_restful_actions_with [:put, :post].each do |method| with_restful_routing :messages, :member => { :mark => method }, :path_names => {:new => 'nuevo'} do |