Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rewrite resource routing tests that are coupled to the router impleme…

…ntation
  • Loading branch information...
commit a0e43073e22bab9c4aaafa419f00c2032f8d28fd 1 parent a3fcfd8
@josh josh authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 actionpack/test/controller/resources_test.rb
View
5 actionpack/test/controller/resources_test.rb
@@ -135,7 +135,7 @@ def test_multiple_default_restful_routes
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 @@ def test_default_singleton_restful_route_uses_get
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
Please sign in to comment.
Something went wrong with that request. Please try again.