@@ -240,17 +240,36 class RoutingTest < ActionController::IntegrationTest | |||||
240 | ) |
|
240 | ) | |
241 | end |
|
241 | end | |
242 |
|
242 | |||
243 | context "issues" do |
|
243 | def test_issues_form_update | |
244 | # issue form update |
|
244 | assert_routing( | |
245 | should_route :post, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23' |
|
245 | { :method => 'post', :path => "/projects/23/issues/new" }, | |
246 |
|
|
246 | { :controller => 'issues', :action => 'new', :project_id => '23' } | |
247 | should_route :post, "/issues.xml", :controller => 'issues', :action => 'create', :format => 'xml' |
|
247 | ) | |
248 |
|
248 | assert_routing( | ||
249 | should_route :get, "/issues/64/edit", :controller => 'issues', :action => 'edit', :id => '64' |
|
249 | { :method => 'post', :path => "/projects/23/issues" }, | |
250 |
|
|
250 | { :controller => 'issues', :action => 'create', :project_id => '23' } | |
251 |
|
251 | ) | ||
252 | should_route :delete, "/issues/1.xml", :controller => 'issues', :action => 'destroy', :id => '1', :format => 'xml' |
|
252 | assert_routing( | |
|
253 | { :method => 'post', :path => "/issues.xml" }, | |||
|
254 | { :controller => 'issues', :action => 'create', :format => 'xml' } | |||
|
255 | ) | |||
|
256 | assert_routing( | |||
|
257 | { :method => 'get', :path => "/issues/64/edit" }, | |||
|
258 | { :controller => 'issues', :action => 'edit', :id => '64' } | |||
|
259 | ) | |||
|
260 | assert_routing( | |||
|
261 | { :method => 'put', :path => "/issues/1.xml" }, | |||
|
262 | { :controller => 'issues', :action => 'update', :id => '1', | |||
|
263 | :format => 'xml' } | |||
|
264 | ) | |||
|
265 | assert_routing( | |||
|
266 | { :method => 'delete', :path => "/issues/1.xml" }, | |||
|
267 | { :controller => 'issues', :action => 'destroy', :id => '1', | |||
|
268 | :format => 'xml' } | |||
|
269 | ) | |||
|
270 | end | |||
253 |
|
271 | |||
|
272 | context "issues" do | |||
254 | # Extra actions |
|
273 | # Extra actions | |
255 | should_route :get, "/projects/23/issues/64/copy", :controller => 'issues', :action => 'new', :project_id => '23', :copy_from => '64' |
|
274 | should_route :get, "/projects/23/issues/64/copy", :controller => 'issues', :action => 'new', :project_id => '23', :copy_from => '64' | |
256 |
|
275 |
General Comments 0
You need to be logged in to leave comments.
Login now