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

@@ -23,26 +23,14 @@ class RoutingTrackersTest < ActionDispatch::IntegrationTest
{ :method => 'get', :path => "/trackers" },
{ :controller => 'trackers', :action => 'index' }
)
assert_routing(
{ :method => 'get', :path => "/trackers.xml" },
{ :controller => 'trackers', :action => 'index', :format => 'xml' }
)
assert_routing(
{ :method => 'post', :path => "/trackers" },
{ :controller => 'trackers', :action => 'create' }
)
assert_routing(
{ :method => 'post', :path => "/trackers.xml" },
{ :controller => 'trackers', :action => 'create', :format => 'xml' }
)
assert_routing(
{ :method => 'get', :path => "/trackers/new" },
{ :controller => 'trackers', :action => 'new' }
)
assert_routing(
{ :method => 'get', :path => "/trackers/new.xml" },
{ :controller => 'trackers', :action => 'new', :format => 'xml' }
)
assert_routing(
{ :method => 'get', :path => "/trackers/1/edit" },
{ :controller => 'trackers', :action => 'edit', :id => '1' }
@@ -52,21 +40,11 @@ class RoutingTrackersTest < ActionDispatch::IntegrationTest
{ :controller => 'trackers', :action => 'update',
:id => '1' }
)
assert_routing(
{ :method => 'put', :path => "/trackers/1.xml" },
{ :controller => 'trackers', :action => 'update',
:format => 'xml', :id => '1' }
)
assert_routing(
{ :method => 'delete', :path => "/trackers/1" },
{ :controller => 'trackers', :action => 'destroy',
:id => '1' }
)
assert_routing(
{ :method => 'delete', :path => "/trackers/1.xml" },
{ :controller => 'trackers', :action => 'destroy',
:format => 'xml', :id => '1' }
)
assert_routing(
{ :method => 'get', :path => "/trackers/fields" },
{ :controller => 'trackers', :action => 'fields' }