@@ -54,6 +54,24 class RoutingIssuesTest < ActionController::IntegrationTest | |||||
54 | { :controller => 'issues', :action => 'show', :id => '64', |
|
54 | { :controller => 'issues', :action => 'show', :id => '64', | |
55 | :format => 'xml' } |
|
55 | :format => 'xml' } | |
56 | ) |
|
56 | ) | |
|
57 | assert_routing( | |||
|
58 | { :method => 'post', :path => "/issues.xml" }, | |||
|
59 | { :controller => 'issues', :action => 'create', :format => 'xml' } | |||
|
60 | ) | |||
|
61 | assert_routing( | |||
|
62 | { :method => 'get', :path => "/issues/64/edit" }, | |||
|
63 | { :controller => 'issues', :action => 'edit', :id => '64' } | |||
|
64 | ) | |||
|
65 | assert_routing( | |||
|
66 | { :method => 'put', :path => "/issues/1.xml" }, | |||
|
67 | { :controller => 'issues', :action => 'update', :id => '1', | |||
|
68 | :format => 'xml' } | |||
|
69 | ) | |||
|
70 | assert_routing( | |||
|
71 | { :method => 'delete', :path => "/issues/1.xml" }, | |||
|
72 | { :controller => 'issues', :action => 'destroy', :id => '1', | |||
|
73 | :format => 'xml' } | |||
|
74 | ) | |||
57 | end |
|
75 | end | |
58 |
|
76 | |||
59 | def test_issues_rest_actions_scoped_under_project |
|
77 | def test_issues_rest_actions_scoped_under_project | |
@@ -77,6 +95,10 class RoutingIssuesTest < ActionController::IntegrationTest | |||||
77 | :format => 'xml' } |
|
95 | :format => 'xml' } | |
78 | ) |
|
96 | ) | |
79 | assert_routing( |
|
97 | assert_routing( | |
|
98 | { :method => 'post', :path => "/projects/23/issues" }, | |||
|
99 | { :controller => 'issues', :action => 'create', :project_id => '23' } | |||
|
100 | ) | |||
|
101 | assert_routing( | |||
80 | { :method => 'get', :path => "/projects/23/issues/new" }, |
|
102 | { :method => 'get', :path => "/projects/23/issues/new" }, | |
81 | { :controller => 'issues', :action => 'new', :project_id => '23' } |
|
103 | { :controller => 'issues', :action => 'new', :project_id => '23' } | |
82 | ) |
|
104 | ) | |
@@ -87,28 +109,6 class RoutingIssuesTest < ActionController::IntegrationTest | |||||
87 | { :method => 'post', :path => "/projects/23/issues/new" }, |
|
109 | { :method => 'post', :path => "/projects/23/issues/new" }, | |
88 | { :controller => 'issues', :action => 'new', :project_id => '23' } |
|
110 | { :controller => 'issues', :action => 'new', :project_id => '23' } | |
89 | ) |
|
111 | ) | |
90 | assert_routing( |
|
|||
91 | { :method => 'post', :path => "/projects/23/issues" }, |
|
|||
92 | { :controller => 'issues', :action => 'create', :project_id => '23' } |
|
|||
93 | ) |
|
|||
94 | assert_routing( |
|
|||
95 | { :method => 'post', :path => "/issues.xml" }, |
|
|||
96 | { :controller => 'issues', :action => 'create', :format => 'xml' } |
|
|||
97 | ) |
|
|||
98 | assert_routing( |
|
|||
99 | { :method => 'get', :path => "/issues/64/edit" }, |
|
|||
100 | { :controller => 'issues', :action => 'edit', :id => '64' } |
|
|||
101 | ) |
|
|||
102 | assert_routing( |
|
|||
103 | { :method => 'put', :path => "/issues/1.xml" }, |
|
|||
104 | { :controller => 'issues', :action => 'update', :id => '1', |
|
|||
105 | :format => 'xml' } |
|
|||
106 | ) |
|
|||
107 | assert_routing( |
|
|||
108 | { :method => 'delete', :path => "/issues/1.xml" }, |
|
|||
109 | { :controller => 'issues', :action => 'destroy', :id => '1', |
|
|||
110 | :format => 'xml' } |
|
|||
111 | ) |
|
|||
112 | end |
|
112 | end | |
113 |
|
113 | |||
114 | def test_issues_extra_actions |
|
114 | def test_issues_extra_actions |
General Comments 0
You need to be logged in to leave comments.
Login now