diff options
author | Rizwan Reza <rizwanreza@gmail.com> | 2010-06-06 14:00:09 +0430 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-06-06 21:27:52 -0400 |
commit | ac9f8e1b7bbbfa13ff75c86ef72fe6641ba26eb3 (patch) | |
tree | 760f73fb814fcf3b40977edb2b53174b7b07862f /actionpack/test/dispatch | |
parent | 83729e2fe36a0a629c2a5a52a7e2970287d57036 (diff) | |
download | rails-ac9f8e1b7bbbfa13ff75c86ef72fe6641ba26eb3.tar.gz rails-ac9f8e1b7bbbfa13ff75c86ef72fe6641ba26eb3.tar.bz2 rails-ac9f8e1b7bbbfa13ff75c86ef72fe6641ba26eb3.zip |
Router accepts member routes on resource. [#4624 state:resolved]
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 180889ddf2..b2b8aca9b2 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -28,6 +28,10 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest post :reset resource :info + + member do + get :crush + end end match 'account/logout' => redirect("/logout"), :as => :logout_redirect @@ -352,6 +356,15 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_member_on_resource + with_test_routes do + get '/session/1/crush' + assert_equal 'sessions#crush', @response.body + + assert_equal '/session/1/crush', crush_session_path(1) + end + end + def test_redirect_modulo with_test_routes do get '/account/modulo/name' |