aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-11-03 11:23:22 -0600
committerJoshua Peek <josh@joshpeek.com>2009-11-03 11:23:22 -0600
commitf950d0b4af54c3d387024dce2c5e2bc56aef0fc3 (patch)
tree44a61c307d733e48399e09e8a99dca92dc5e62d2 /actionpack/test/dispatch/routing_test.rb
parentaaa5a692a3e471f7f8f50957aac1c06fd30ec166 (diff)
downloadrails-f950d0b4af54c3d387024dce2c5e2bc56aef0fc3.tar.gz
rails-f950d0b4af54c3d387024dce2c5e2bc56aef0fc3.tar.bz2
rails-f950d0b4af54c3d387024dce2c5e2bc56aef0fc3.zip
Fix simple resource named routes for new routing dsl
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb25
1 files changed, 19 insertions, 6 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 74e6c8e72d..7917c1974b 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -190,8 +190,21 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
def test_projects
with_test_routes do
+ get '/projects'
+ assert_equal 'projects#index', @response.body
+ assert_equal '/projects', projects_path
+
+ get '/projects/new'
+ assert_equal 'projects#new', @response.body
+ assert_equal '/projects/new', new_project_path
+
get '/projects/1'
assert_equal 'projects#show', @response.body
+ assert_equal '/projects/1', project_path(:id => '1')
+
+ get '/projects/1/edit'
+ assert_equal 'projects#edit', @response.body
+ assert_equal '/projects/1/edit', edit_project_path(:id => '1')
end
end
@@ -231,7 +244,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal 'people#index', @response.body
get '/projects/1/companies/1/avatar'
- assert_equal 'avatar#show', @response.body
+ assert_equal 'avatars#show', @response.body
end
end
@@ -254,7 +267,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal 'people#show', @response.body
get '/projects/1/people/1/7a2dec8/avatar'
- assert_equal 'avatar#show', @response.body
+ assert_equal 'avatars#show', @response.body
put '/projects/1/people/1/accessible_projects'
assert_equal 'people#accessible_projects', @response.body
@@ -282,7 +295,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal 'posts#preview', @response.body
get '/projects/1/posts/1/subscription'
- assert_equal 'subscription#show', @response.body
+ assert_equal 'subscriptions#show', @response.body
get '/projects/1/posts/1/comments'
assert_equal 'comments#index', @response.body
@@ -329,13 +342,13 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
def test_account_namespace
with_test_routes do
get '/account/subscription'
- assert_equal 'subscription#show', @response.body
+ assert_equal 'subscriptions#show', @response.body
get '/account/credit'
- assert_equal 'credit#show', @response.body
+ assert_equal 'credits#show', @response.body
get '/account/credit_card'
- assert_equal 'credit_card#show', @response.body
+ assert_equal 'credit_cards#show', @response.body
end
end