diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-09-13 18:43:16 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-13 18:43:16 -0500 |
commit | a0e43073e22bab9c4aaafa419f00c2032f8d28fd (patch) | |
tree | 637a16c2a7848d28b76be58f24b34780cf8645fb /actionpack/test/controller | |
parent | a3fcfd819b85e89286ffe9dfc3a3f22555cd55fc (diff) | |
download | rails-a0e43073e22bab9c4aaafa419f00c2032f8d28fd.tar.gz rails-a0e43073e22bab9c4aaafa419f00c2032f8d28fd.tar.bz2 rails-a0e43073e22bab9c4aaafa419f00c2032f8d28fd.zip |
Rewrite resource routing tests that are coupled to the router implementation
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/resources_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index 0b639e363d..5b47de19ae 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -135,7 +135,7 @@ class ResourcesTest < ActionController::TestCase def test_with_custom_conditions with_restful_routing :messages, :conditions => { :subdomain => 'app' } do - assert_equal 'app', ActionController::Routing::Routes.named_routes.routes[:messages].conditions[:subdomain] + assert ActionController::Routing::Routes.recognize_path("/messages", :method => :get, :subdomain => 'app') end end @@ -1130,7 +1130,8 @@ class ResourcesTest < ActionController::TestCase map.resource :product end - assert_equal :get, set.named_routes.routes[:product].conditions[:method] + assert_routing '/product', :controller => 'products', :action => 'show' + assert set.recognize_path("/product", :method => :get) end end |