@@ -18,13 +18,18 | |||
|
18 | 18 | require File.expand_path('../../../test_helper', __FILE__) |
|
19 | 19 | |
|
20 | 20 | class RoutingVersionsTest < ActionController::IntegrationTest |
|
21 | def test_versions | |
|
21 | def test_versions_scoped_under_project | |
|
22 | 22 | # /projects/foo/versions is /projects/foo/roadmap |
|
23 | 23 | assert_routing( |
|
24 | 24 | { :method => 'get', :path => "/projects/33/roadmap" }, |
|
25 | 25 | { :controller => 'versions', :action => 'index', :project_id => '33' } |
|
26 | 26 | ) |
|
27 | 27 | assert_routing( |
|
28 | { :method => 'put', :path => "/projects/foo/versions/close_completed" }, | |
|
29 | { :controller => 'versions', :action => 'close_completed', | |
|
30 | :project_id => 'foo' } | |
|
31 | ) | |
|
32 | assert_routing( | |
|
28 | 33 | { :method => 'get', :path => "/projects/foo/versions.xml" }, |
|
29 | 34 | { :controller => 'versions', :action => 'index', |
|
30 | 35 | :project_id => 'foo', :format => 'xml' } |
@@ -54,6 +59,9 class RoutingVersionsTest < ActionController::IntegrationTest | |||
|
54 | 59 | { :controller => 'versions', :action => 'create', |
|
55 | 60 | :project_id => 'foo', :format => 'json' } |
|
56 | 61 | ) |
|
62 | end | |
|
63 | ||
|
64 | def test_versions | |
|
57 | 65 | assert_routing( |
|
58 | 66 | { :method => 'get', :path => "/versions/1" }, |
|
59 | 67 | { :controller => 'versions', :action => 'show', :id => '1' } |
@@ -101,11 +109,6 class RoutingVersionsTest < ActionController::IntegrationTest | |||
|
101 | 109 | :format => 'json' } |
|
102 | 110 | ) |
|
103 | 111 | assert_routing( |
|
104 | { :method => 'put', :path => "/projects/foo/versions/close_completed" }, | |
|
105 | { :controller => 'versions', :action => 'close_completed', | |
|
106 | :project_id => 'foo' } | |
|
107 | ) | |
|
108 | assert_routing( | |
|
109 | 112 | { :method => 'post', :path => "/versions/1/status_by" }, |
|
110 | 113 | { :controller => 'versions', :action => 'status_by', :id => '1' } |
|
111 | 114 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now