diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-06 09:47:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-06 09:47:10 +0000 |
commit | c5665276b7a465f29230341f8800af4f77b3c141 (patch) | |
tree | 63789c1cb348d3a95bfe3a11dd4852809191202e /test/integration/routing | |
parent | 942651ecdfd860b9da68254b2a7d0919dc8151d2 (diff) | |
download | redmine-c5665276b7a465f29230341f8800af4f77b3c141.tar.gz redmine-c5665276b7a465f29230341f8800af4f77b3c141.zip |
REST API for project memberships (#7420).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8798 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/routing')
-rw-r--r-- | test/integration/routing/members_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/integration/routing/members_test.rb b/test/integration/routing/members_test.rb index 4c78b15c7..87181b089 100644 --- a/test/integration/routing/members_test.rb +++ b/test/integration/routing/members_test.rb @@ -20,18 +20,38 @@ require File.expand_path('../../../test_helper', __FILE__) class RoutingMembersTest < ActionController::IntegrationTest def test_members assert_routing( + { :method => 'get', :path => "/projects/5234/memberships.xml" }, + { :controller => 'members', :action => 'index', :project_id => '5234', :format => 'xml' } + ) + assert_routing( + { :method => 'get', :path => "/memberships/5234.xml" }, + { :controller => 'members', :action => 'show', :id => '5234', :format => 'xml' } + ) + assert_routing( { :method => 'post', :path => "/projects/5234/memberships" }, { :controller => 'members', :action => 'create', :project_id => '5234' } ) assert_routing( + { :method => 'post', :path => "/projects/5234/memberships.xml" }, + { :controller => 'members', :action => 'create', :project_id => '5234', :format => 'xml' } + ) + assert_routing( { :method => 'put', :path => "/memberships/5234" }, { :controller => 'members', :action => 'update', :id => '5234' } ) assert_routing( + { :method => 'put', :path => "/memberships/5234.xml" }, + { :controller => 'members', :action => 'update', :id => '5234', :format => 'xml' } + ) + assert_routing( { :method => 'delete', :path => "/memberships/5234" }, { :controller => 'members', :action => 'destroy', :id => '5234' } ) assert_routing( + { :method => 'delete', :path => "/memberships/5234.xml" }, + { :controller => 'members', :action => 'destroy', :id => '5234', :format => 'xml' } + ) + assert_routing( { :method => 'get', :path => "/projects/5234/memberships/autocomplete" }, { :controller => 'members', :action => 'autocomplete', :project_id => '5234' } ) |