summaryrefslogtreecommitdiffstats
path: root/test/integration/routing
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-06-03 10:40:32 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-06-03 10:40:32 +0000
commitdd9c2cafa795ec00875981dcedd3287d2d005457 (patch)
tree4d540a76dc06fb4d530bb5804d3676fa366489d7 /test/integration/routing
parent3142183b3052b520126645eaec01526810e2afff (diff)
downloadredmine-dd9c2cafa795ec00875981dcedd3287d2d005457.tar.gz
redmine-dd9c2cafa795ec00875981dcedd3287d2d005457.zip
REST Api for Groups (#8981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9758 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/routing')
-rw-r--r--test/integration/routing/groups_test.rb36
1 files changed, 16 insertions, 20 deletions
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
@@ -40,47 +40,36 @@ class RoutingGroupsTest < ActionController::IntegrationTest
{ :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
@@ -90,9 +79,16 @@ class RoutingGroupsTest < ActionController::IntegrationTest
{ :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" },