aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/resources_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-07-28 11:10:23 -0700
committerJosé Valim <jose.valim@gmail.com>2011-07-28 11:10:23 -0700
commitb295ea1362bdd5033cfb5602985c0c11f37e2ae0 (patch)
tree3c63adc1d28c5c931de82e09627780437577144c /actionpack/test/controller/resources_test.rb
parentadce9b4ca30e13ca2f952cee5805f06e31c4ff70 (diff)
parenta5f57a7ef2af05ac1f7b919040e10c1b21de8e56 (diff)
downloadrails-b295ea1362bdd5033cfb5602985c0c11f37e2ae0.tar.gz
rails-b295ea1362bdd5033cfb5602985c0c11f37e2ae0.tar.bz2
rails-b295ea1362bdd5033cfb5602985c0c11f37e2ae0.zip
Merge pull request #2330 from thedarkone/resources-router-fix
Inline resources router fix
Diffstat (limited to 'actionpack/test/controller/resources_test.rb')
-rw-r--r--actionpack/test/controller/resources_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index 6ea492cf8b..3b1b5fc3ec 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -91,6 +91,15 @@ class ResourcesTest < ActionController::TestCase
end
end
+ def test_multiple_resources_with_options
+ expected_options = {:controller => 'threads', :action => 'index'}
+
+ with_restful_routing :messages, :comments, expected_options.slice(:controller) do
+ assert_recognizes(expected_options, :path => 'comments')
+ assert_recognizes(expected_options, :path => 'messages')
+ end
+ end
+
def test_with_custom_conditions
with_restful_routing :messages, :conditions => { :subdomain => 'app' } do
assert @routes.recognize_path("/messages", :method => :get, :subdomain => 'app')