summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/routing/issues_test.rb35
1 files changed, 19 insertions, 16 deletions
diff --git a/test/integration/routing/issues_test.rb b/test/integration/routing/issues_test.rb
index 379852a2c..7b95360b1 100644
--- a/test/integration/routing/issues_test.rb
+++ b/test/integration/routing/issues_test.rb
@@ -36,41 +36,44 @@ class RoutingIssuesTest < ActionController::IntegrationTest
{ :controller => 'issues', :action => 'index', :format => 'xml' }
)
assert_routing(
- { :method => 'get', :path => "/projects/23/issues" },
- { :controller => 'issues', :action => 'index', :project_id => '23' }
+ { :method => 'get', :path => "/issues/64" },
+ { :controller => 'issues', :action => 'show', :id => '64' }
)
assert_routing(
- { :method => 'get', :path => "/projects/23/issues.pdf" },
- { :controller => 'issues', :action => 'index', :project_id => '23',
+ { :method => 'get', :path => "/issues/64.pdf" },
+ { :controller => 'issues', :action => 'show', :id => '64',
:format => 'pdf' }
)
assert_routing(
- { :method => 'get', :path => "/projects/23/issues.atom" },
- { :controller => 'issues', :action => 'index', :project_id => '23',
+ { :method => 'get', :path => "/issues/64.atom" },
+ { :controller => 'issues', :action => 'show', :id => '64',
:format => 'atom' }
)
assert_routing(
- { :method => 'get', :path => "/projects/23/issues.xml" },
- { :controller => 'issues', :action => 'index', :project_id => '23',
+ { :method => 'get', :path => "/issues/64.xml" },
+ { :controller => 'issues', :action => 'show', :id => '64',
:format => 'xml' }
)
+ end
+
+ def test_issues_rest_actions_scoped_under_project
assert_routing(
- { :method => 'get', :path => "/issues/64" },
- { :controller => 'issues', :action => 'show', :id => '64' }
+ { :method => 'get', :path => "/projects/23/issues" },
+ { :controller => 'issues', :action => 'index', :project_id => '23' }
)
assert_routing(
- { :method => 'get', :path => "/issues/64.pdf" },
- { :controller => 'issues', :action => 'show', :id => '64',
+ { :method => 'get', :path => "/projects/23/issues.pdf" },
+ { :controller => 'issues', :action => 'index', :project_id => '23',
:format => 'pdf' }
)
assert_routing(
- { :method => 'get', :path => "/issues/64.atom" },
- { :controller => 'issues', :action => 'show', :id => '64',
+ { :method => 'get', :path => "/projects/23/issues.atom" },
+ { :controller => 'issues', :action => 'index', :project_id => '23',
:format => 'atom' }
)
assert_routing(
- { :method => 'get', :path => "/issues/64.xml" },
- { :controller => 'issues', :action => 'show', :id => '64',
+ { :method => 'get', :path => "/projects/23/issues.xml" },
+ { :controller => 'issues', :action => 'index', :project_id => '23',
:format => 'xml' }
)
assert_routing(