test: replace "should_route" of "groups" to "assert_routing" at integration/routing_test.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8221 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-12-15 07:06:37 +00:00
parent f968acbfac
commit 6248689b89
1 changed files with 11 additions and 4 deletions

View File

@ -166,10 +166,17 @@ class RoutingTest < ActionController::IntegrationTest
should_route :put, "/enumerations/2", :controller => 'enumerations', :action => 'update', :id => 2
should_route :delete, "/enumerations/2", :controller => 'enumerations', :action => 'destroy', :id => 2
end
context "groups" do
should_route :post, "/groups/567/users", :controller => 'groups', :action => 'add_users', :id => '567'
should_route :delete, "/groups/567/users/12", :controller => 'groups', :action => 'remove_user', :id => '567', :user_id => '12'
def test_groups
assert_routing(
{ :method => 'post', :path => "/groups/567/users" },
{ :controller => 'groups', :action => 'add_users', :id => '567' }
)
assert_routing(
{ :method => 'delete', :path => "/groups/567/users/12" },
{ :controller => 'groups', :action => 'remove_user', :id => '567',
:user_id => '12' }
)
end
def test_issues_rest_actions