aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/routing_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index bdd4606720..b38933095c 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -187,7 +187,9 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
end
resources :posts, :only => [:index, :show] do
- resources :comments, :except => :destroy
+ resources :comments, :except => :destroy do
+ get "views" => "comments#views", :as => :views
+ end
end
resource :past, :only => :destroy
@@ -2308,6 +2310,12 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
end
end
+ def test_nested_route_in_nested_resource
+ get "/posts/1/comments/2/views"
+ assert_equal "comments#views", @response.body
+ assert_equal "/posts/1/comments/2/views", post_comment_views_path(:post_id => '1', :comment_id => '2')
+ end
+
private
def with_test_routes
yield