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:
Jean-Philippe Lang
2014-11-16 10:54:33 +00:00
parent cd6b2f2268
commit eae9c9ab2b
22 changed files with 207 additions and 438 deletions

View File

@@ -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' }