From dd9c2cafa795ec00875981dcedd3287d2d005457 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 3 Jun 2012 10:40:32 +0000 Subject: REST Api for Groups (#8981). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9758 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/routing/groups_test.rb | 36 +++++++++++++++------------------ 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'test/integration/routing') diff --git a/test/integration/routing/groups_test.rb b/test/integration/routing/groups_test.rb index f22c80b06..6495201dd 100644 --- a/test/integration/routing/groups_test.rb +++ b/test/integration/routing/groups_test.rb @@ -39,48 +39,37 @@ class RoutingGroupsTest < ActionController::IntegrationTest { :method => 'get', :path => "/groups/new" }, { :controller => 'groups', :action => 'new' } ) - assert_routing( - { :method => 'get', :path => "/groups/new.xml" }, - { :controller => 'groups', :action => 'new', :format => 'xml' } - ) assert_routing( { :method => 'get', :path => "/groups/1/edit" }, { :controller => 'groups', :action => 'edit', :id => '1' } ) assert_routing( { :method => 'get', :path => "/groups/1/autocomplete_for_user" }, - { :controller => 'groups', :action => 'autocomplete_for_user', - :id => '1' } + { :controller => 'groups', :action => 'autocomplete_for_user', :id => '1' } ) assert_routing( { :method => 'get', :path => "/groups/1" }, - { :controller => 'groups', :action => 'show', - :id => '1' } + { :controller => 'groups', :action => 'show', :id => '1' } ) assert_routing( { :method => 'get', :path => "/groups/1.xml" }, - { :controller => 'groups', :action => 'show', - :format => 'xml', :id => '1' } + { :controller => 'groups', :action => 'show', :id => '1', :format => 'xml' } ) assert_routing( { :method => 'put', :path => "/groups/1" }, - { :controller => 'groups', :action => 'update', - :id => '1' } + { :controller => 'groups', :action => 'update', :id => '1' } ) assert_routing( { :method => 'put', :path => "/groups/1.xml" }, - { :controller => 'groups', :action => 'update', - :format => 'xml', :id => '1' } + { :controller => 'groups', :action => 'update', :id => '1', :format => 'xml' } ) assert_routing( { :method => 'delete', :path => "/groups/1" }, - { :controller => 'groups', :action => 'destroy', - :id => '1' } + { :controller => 'groups', :action => 'destroy', :id => '1' } ) assert_routing( { :method => 'delete', :path => "/groups/1.xml" }, - { :controller => 'groups', :action => 'destroy', - :format => 'xml', :id => '1' } + { :controller => 'groups', :action => 'destroy', :id => '1', :format => 'xml' } ) end @@ -89,10 +78,17 @@ class RoutingGroupsTest < ActionController::IntegrationTest { :method => 'post', :path => "/groups/567/users" }, { :controller => 'groups', :action => 'add_users', :id => '567' } ) + assert_routing( + { :method => 'post', :path => "/groups/567/users.xml" }, + { :controller => 'groups', :action => 'add_users', :id => '567', :format => 'xml' } + ) assert_routing( { :method => 'delete', :path => "/groups/567/users/12" }, - { :controller => 'groups', :action => 'remove_user', :id => '567', - :user_id => '12' } + { :controller => 'groups', :action => 'remove_user', :id => '567', :user_id => '12' } + ) + assert_routing( + { :method => 'delete', :path => "/groups/567/users/12.xml" }, + { :controller => 'groups', :action => 'remove_user', :id => '567', :user_id => '12', :format => 'xml' } ) assert_routing( { :method => 'post', :path => "/groups/destroy_membership/567" }, -- cgit v1.2.3