test: route: split issues rest actions tests whether scoped under project or not
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8433 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
1b252d68f3
commit
9835f4b800
|
@ -35,25 +35,6 @@ class RoutingIssuesTest < ActionController::IntegrationTest
|
||||||
{ :method => 'get', :path => "/issues.xml" },
|
{ :method => 'get', :path => "/issues.xml" },
|
||||||
{ :controller => 'issues', :action => 'index', :format => 'xml' }
|
{ :controller => 'issues', :action => 'index', :format => 'xml' }
|
||||||
)
|
)
|
||||||
assert_routing(
|
|
||||||
{ :method => 'get', :path => "/projects/23/issues" },
|
|
||||||
{ :controller => 'issues', :action => 'index', :project_id => '23' }
|
|
||||||
)
|
|
||||||
assert_routing(
|
|
||||||
{ :method => 'get', :path => "/projects/23/issues.pdf" },
|
|
||||||
{ :controller => 'issues', :action => 'index', :project_id => '23',
|
|
||||||
:format => 'pdf' }
|
|
||||||
)
|
|
||||||
assert_routing(
|
|
||||||
{ :method => 'get', :path => "/projects/23/issues.atom" },
|
|
||||||
{ :controller => 'issues', :action => 'index', :project_id => '23',
|
|
||||||
:format => 'atom' }
|
|
||||||
)
|
|
||||||
assert_routing(
|
|
||||||
{ :method => 'get', :path => "/projects/23/issues.xml" },
|
|
||||||
{ :controller => 'issues', :action => 'index', :project_id => '23',
|
|
||||||
:format => 'xml' }
|
|
||||||
)
|
|
||||||
assert_routing(
|
assert_routing(
|
||||||
{ :method => 'get', :path => "/issues/64" },
|
{ :method => 'get', :path => "/issues/64" },
|
||||||
{ :controller => 'issues', :action => 'show', :id => '64' }
|
{ :controller => 'issues', :action => 'show', :id => '64' }
|
||||||
|
@ -73,6 +54,28 @@ class RoutingIssuesTest < ActionController::IntegrationTest
|
||||||
{ :controller => 'issues', :action => 'show', :id => '64',
|
{ :controller => 'issues', :action => 'show', :id => '64',
|
||||||
:format => 'xml' }
|
:format => 'xml' }
|
||||||
)
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_issues_rest_actions_scoped_under_project
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get', :path => "/projects/23/issues" },
|
||||||
|
{ :controller => 'issues', :action => 'index', :project_id => '23' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get', :path => "/projects/23/issues.pdf" },
|
||||||
|
{ :controller => 'issues', :action => 'index', :project_id => '23',
|
||||||
|
:format => 'pdf' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get', :path => "/projects/23/issues.atom" },
|
||||||
|
{ :controller => 'issues', :action => 'index', :project_id => '23',
|
||||||
|
:format => 'atom' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get', :path => "/projects/23/issues.xml" },
|
||||||
|
{ :controller => 'issues', :action => 'index', :project_id => '23',
|
||||||
|
:format => 'xml' }
|
||||||
|
)
|
||||||
assert_routing(
|
assert_routing(
|
||||||
{ :method => 'get', :path => "/projects/23/issues/new" },
|
{ :method => 'get', :path => "/projects/23/issues/new" },
|
||||||
{ :controller => 'issues', :action => 'new', :project_id => '23' }
|
{ :controller => 'issues', :action => 'new', :project_id => '23' }
|
||||||
|
|
Loading…
Reference in New Issue