mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
Isolates all API routing tests to a specific test case.
git-svn-id: http://svn.redmine.org/redmine/trunk@13604 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -19,22 +19,10 @@ require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingMembersTest < ActionDispatch::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 => 'get', :path => "/projects/5234/memberships/new" },
|
||||
{ :controller => 'members', :action => 'new', :project_id => '5234' }
|
||||
@@ -43,18 +31,10 @@ class RoutingMembersTest < ActionDispatch::IntegrationTest
|
||||
{ :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' }
|
||||
|
||||
Reference in New Issue
Block a user