mirror of
https://github.com/redmine/redmine.git
synced 2025-10-31 18:36:07 +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:
@@ -32,16 +32,6 @@ class RoutingVersionsTest < ActionDispatch::IntegrationTest
|
||||
{ :controller => 'versions', :action => 'close_completed',
|
||||
:project_id => 'foo' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/foo/versions.xml" },
|
||||
{ :controller => 'versions', :action => 'index',
|
||||
:project_id => 'foo', :format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/foo/versions.json" },
|
||||
{ :controller => 'versions', :action => 'index',
|
||||
:project_id => 'foo', :format => 'json' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/foo/versions/new" },
|
||||
{ :controller => 'versions', :action => 'new',
|
||||
@@ -52,16 +42,6 @@ class RoutingVersionsTest < ActionDispatch::IntegrationTest
|
||||
{ :controller => 'versions', :action => 'create',
|
||||
:project_id => 'foo' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/projects/foo/versions.xml" },
|
||||
{ :controller => 'versions', :action => 'create',
|
||||
:project_id => 'foo', :format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/projects/foo/versions.json" },
|
||||
{ :controller => 'versions', :action => 'create',
|
||||
:project_id => 'foo', :format => 'json' }
|
||||
)
|
||||
end
|
||||
|
||||
def test_versions
|
||||
@@ -69,16 +49,6 @@ class RoutingVersionsTest < ActionDispatch::IntegrationTest
|
||||
{ :method => 'get', :path => "/versions/1" },
|
||||
{ :controller => 'versions', :action => 'show', :id => '1' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/versions/1.xml" },
|
||||
{ :controller => 'versions', :action => 'show', :id => '1',
|
||||
:format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/versions/1.json" },
|
||||
{ :controller => 'versions', :action => 'show', :id => '1',
|
||||
:format => 'json' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/versions/1/edit" },
|
||||
{ :controller => 'versions', :action => 'edit', :id => '1' }
|
||||
@@ -87,30 +57,10 @@ class RoutingVersionsTest < ActionDispatch::IntegrationTest
|
||||
{ :method => 'put', :path => "/versions/1" },
|
||||
{ :controller => 'versions', :action => 'update', :id => '1' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'put', :path => "/versions/1.xml" },
|
||||
{ :controller => 'versions', :action => 'update', :id => '1',
|
||||
:format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'put', :path => "/versions/1.json" },
|
||||
{ :controller => 'versions', :action => 'update', :id => '1',
|
||||
:format => 'json' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete', :path => "/versions/1" },
|
||||
{ :controller => 'versions', :action => 'destroy', :id => '1' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete', :path => "/versions/1.xml" },
|
||||
{ :controller => 'versions', :action => 'destroy', :id => '1',
|
||||
:format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete', :path => "/versions/1.json" },
|
||||
{ :controller => 'versions', :action => 'destroy', :id => '1',
|
||||
:format => 'json' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/versions/1/status_by" },
|
||||
{ :controller => 'versions', :action => 'status_by', :id => '1' }
|
||||
|
||||
Reference in New Issue
Block a user