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:
parent
f968acbfac
commit
6248689b89
|
@ -167,9 +167,16 @@ class RoutingTest < ActionController::IntegrationTest
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue