mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 02:46:13 +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:
@@ -23,28 +23,14 @@ class RoutingUsersTest < ActionDispatch::IntegrationTest
|
||||
{ :method => 'get', :path => "/users" },
|
||||
{ :controller => 'users', :action => 'index' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/users.xml" },
|
||||
{ :controller => 'users', :action => 'index', :format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/users/44" },
|
||||
{ :controller => 'users', :action => 'show', :id => '44' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/users/44.xml" },
|
||||
{ :controller => 'users', :action => 'show', :id => '44',
|
||||
:format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/users/current" },
|
||||
{ :controller => 'users', :action => 'show', :id => 'current' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/users/current.xml" },
|
||||
{ :controller => 'users', :action => 'show', :id => 'current',
|
||||
:format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/users/new" },
|
||||
{ :controller => 'users', :action => 'new' }
|
||||
@@ -57,27 +43,13 @@ class RoutingUsersTest < ActionDispatch::IntegrationTest
|
||||
{ :method => 'post', :path => "/users" },
|
||||
{ :controller => 'users', :action => 'create' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/users.xml" },
|
||||
{ :controller => 'users', :action => 'create', :format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'put', :path => "/users/444" },
|
||||
{ :controller => 'users', :action => 'update', :id => '444' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'put', :path => "/users/444.xml" },
|
||||
{ :controller => 'users', :action => 'update', :id => '444',
|
||||
:format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete', :path => "/users/44" },
|
||||
{ :controller => 'users', :action => 'destroy', :id => '44' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete', :path => "/users/44.xml" },
|
||||
{ :controller => 'users', :action => 'destroy', :id => '44',
|
||||
:format => 'xml' }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user