@@ -36,41 +36,44 class RoutingIssuesTest < ActionController::IntegrationTest | |||
|
36 | 36 | { :controller => 'issues', :action => 'index', :format => 'xml' } |
|
37 | 37 | ) |
|
38 | 38 | assert_routing( |
|
39 |
{ :method => 'get', :path => " |
|
|
40 |
{ :controller => 'issues', :action => ' |
|
|
39 | { :method => 'get', :path => "/issues/64" }, | |
|
40 | { :controller => 'issues', :action => 'show', :id => '64' } | |
|
41 | 41 | ) |
|
42 | 42 | assert_routing( |
|
43 |
{ :method => 'get', :path => " |
|
|
44 |
{ :controller => 'issues', :action => ' |
|
|
43 | { :method => 'get', :path => "/issues/64.pdf" }, | |
|
44 | { :controller => 'issues', :action => 'show', :id => '64', | |
|
45 | 45 | :format => 'pdf' } |
|
46 | 46 | ) |
|
47 | 47 | assert_routing( |
|
48 |
{ :method => 'get', :path => " |
|
|
49 |
{ :controller => 'issues', :action => ' |
|
|
48 | { :method => 'get', :path => "/issues/64.atom" }, | |
|
49 | { :controller => 'issues', :action => 'show', :id => '64', | |
|
50 | 50 | :format => 'atom' } |
|
51 | 51 | ) |
|
52 | 52 | assert_routing( |
|
53 |
{ :method => 'get', :path => " |
|
|
54 |
{ :controller => 'issues', :action => ' |
|
|
53 | { :method => 'get', :path => "/issues/64.xml" }, | |
|
54 | { :controller => 'issues', :action => 'show', :id => '64', | |
|
55 | 55 | :format => 'xml' } |
|
56 | 56 | ) |
|
57 | end | |
|
58 | ||
|
59 | def test_issues_rest_actions_scoped_under_project | |
|
57 | 60 | assert_routing( |
|
58 |
{ :method => 'get', :path => "/issues |
|
|
59 |
{ :controller => 'issues', :action => ' |
|
|
61 | { :method => 'get', :path => "/projects/23/issues" }, | |
|
62 | { :controller => 'issues', :action => 'index', :project_id => '23' } | |
|
60 | 63 | ) |
|
61 | 64 | assert_routing( |
|
62 |
{ :method => 'get', :path => "/issues |
|
|
63 |
{ :controller => 'issues', :action => ' |
|
|
65 | { :method => 'get', :path => "/projects/23/issues.pdf" }, | |
|
66 | { :controller => 'issues', :action => 'index', :project_id => '23', | |
|
64 | 67 | :format => 'pdf' } |
|
65 | 68 | ) |
|
66 | 69 | assert_routing( |
|
67 |
{ :method => 'get', :path => "/issues |
|
|
68 |
{ :controller => 'issues', :action => ' |
|
|
70 | { :method => 'get', :path => "/projects/23/issues.atom" }, | |
|
71 | { :controller => 'issues', :action => 'index', :project_id => '23', | |
|
69 | 72 | :format => 'atom' } |
|
70 | 73 | ) |
|
71 | 74 | assert_routing( |
|
72 |
{ :method => 'get', :path => "/issues |
|
|
73 |
{ :controller => 'issues', :action => ' |
|
|
75 | { :method => 'get', :path => "/projects/23/issues.xml" }, | |
|
76 | { :controller => 'issues', :action => 'index', :project_id => '23', | |
|
74 | 77 | :format => 'xml' } |
|
75 | 78 | ) |
|
76 | 79 | assert_routing( |
General Comments 0
You need to be logged in to leave comments.
Login now