@@ -366,30 +366,88 class RoutingTest < ActionController::IntegrationTest | |||||
366 | ) |
|
366 | ) | |
367 | end |
|
367 | end | |
368 |
|
368 | |||
369 |
|
|
369 | def test_issue_categories | |
370 | should_route :get, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'index', :project_id => 'foo' |
|
370 | assert_routing( | |
371 | should_route :get, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'xml' |
|
371 | { :method => 'get', :path => "/projects/foo/issue_categories" }, | |
372 | should_route :get, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'json' |
|
372 | { :controller => 'issue_categories', :action => 'index', | |
373 |
|
373 | :project_id => 'foo' } | ||
374 | should_route :get, "/projects/foo/issue_categories/new", :controller => 'issue_categories', :action => 'new', :project_id => 'foo' |
|
374 | ) | |
375 |
|
375 | assert_routing( | ||
376 | should_route :post, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'create', :project_id => 'foo' |
|
376 | { :method => 'get', :path => "/projects/foo/issue_categories.xml" }, | |
377 | should_route :post, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'xml' |
|
377 | { :controller => 'issue_categories', :action => 'index', | |
378 | should_route :post, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'json' |
|
378 | :project_id => 'foo', :format => 'xml' } | |
379 |
|
379 | ) | ||
380 | should_route :get, "/issue_categories/1", :controller => 'issue_categories', :action => 'show', :id => '1' |
|
380 | assert_routing( | |
381 | should_route :get, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'xml' |
|
381 | { :method => 'get', :path => "/projects/foo/issue_categories.json" }, | |
382 | should_route :get, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'json' |
|
382 | { :controller => 'issue_categories', :action => 'index', | |
383 |
|
383 | :project_id => 'foo', :format => 'json' } | ||
384 | should_route :get, "/issue_categories/1/edit", :controller => 'issue_categories', :action => 'edit', :id => '1' |
|
384 | ) | |
385 |
|
385 | assert_routing( | ||
386 | should_route :put, "/issue_categories/1", :controller => 'issue_categories', :action => 'update', :id => '1' |
|
386 | { :method => 'get', :path => "/projects/foo/issue_categories/new" }, | |
387 | should_route :put, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'xml' |
|
387 | { :controller => 'issue_categories', :action => 'new', | |
388 | should_route :put, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'json' |
|
388 | :project_id => 'foo' } | |
389 |
|
389 | ) | ||
390 | should_route :delete, "/issue_categories/1", :controller => 'issue_categories', :action => 'destroy', :id => '1' |
|
390 | assert_routing( | |
391 | should_route :delete, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'xml' |
|
391 | { :method => 'post', :path => "/projects/foo/issue_categories" }, | |
392 | should_route :delete, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'json' |
|
392 | { :controller => 'issue_categories', :action => 'create', | |
|
393 | :project_id => 'foo' } | |||
|
394 | ) | |||
|
395 | assert_routing( | |||
|
396 | { :method => 'post', :path => "/projects/foo/issue_categories.xml" }, | |||
|
397 | { :controller => 'issue_categories', :action => 'create', | |||
|
398 | :project_id => 'foo', :format => 'xml' } | |||
|
399 | ) | |||
|
400 | assert_routing( | |||
|
401 | { :method => 'post', :path => "/projects/foo/issue_categories.json" }, | |||
|
402 | { :controller => 'issue_categories', :action => 'create', | |||
|
403 | :project_id => 'foo', :format => 'json' } | |||
|
404 | ) | |||
|
405 | assert_routing( | |||
|
406 | { :method => 'get', :path => "/issue_categories/1" }, | |||
|
407 | { :controller => 'issue_categories', :action => 'show', :id => '1' } | |||
|
408 | ) | |||
|
409 | assert_routing( | |||
|
410 | { :method => 'get', :path => "/issue_categories/1.xml" }, | |||
|
411 | { :controller => 'issue_categories', :action => 'show', :id => '1', | |||
|
412 | :format => 'xml' } | |||
|
413 | ) | |||
|
414 | assert_routing( | |||
|
415 | { :method => 'get', :path => "/issue_categories/1.json" }, | |||
|
416 | { :controller => 'issue_categories', :action => 'show', :id => '1', | |||
|
417 | :format => 'json' } | |||
|
418 | ) | |||
|
419 | assert_routing( | |||
|
420 | { :method => 'get', :path => "/issue_categories/1/edit" }, | |||
|
421 | { :controller => 'issue_categories', :action => 'edit', :id => '1' } | |||
|
422 | ) | |||
|
423 | assert_routing( | |||
|
424 | { :method => 'put', :path => "/issue_categories/1" }, | |||
|
425 | { :controller => 'issue_categories', :action => 'update', :id => '1' } | |||
|
426 | ) | |||
|
427 | assert_routing( | |||
|
428 | { :method => 'put', :path => "/issue_categories/1.xml" }, | |||
|
429 | { :controller => 'issue_categories', :action => 'update', :id => '1', | |||
|
430 | :format => 'xml' } | |||
|
431 | ) | |||
|
432 | assert_routing( | |||
|
433 | { :method => 'put', :path => "/issue_categories/1.json" }, | |||
|
434 | { :controller => 'issue_categories', :action => 'update', :id => '1', | |||
|
435 | :format => 'json' } | |||
|
436 | ) | |||
|
437 | assert_routing( | |||
|
438 | { :method => 'delete', :path => "/issue_categories/1" }, | |||
|
439 | { :controller => 'issue_categories', :action => 'destroy', :id => '1' } | |||
|
440 | ) | |||
|
441 | assert_routing( | |||
|
442 | { :method => 'delete', :path => "/issue_categories/1.xml" }, | |||
|
443 | { :controller => 'issue_categories', :action => 'destroy', :id => '1', | |||
|
444 | :format => 'xml' } | |||
|
445 | ) | |||
|
446 | assert_routing( | |||
|
447 | { :method => 'delete', :path => "/issue_categories/1.json" }, | |||
|
448 | { :controller => 'issue_categories', :action => 'destroy', :id => '1', | |||
|
449 | :format => 'json' } | |||
|
450 | ) | |||
393 | end |
|
451 | end | |
394 |
|
452 | |||
395 | def test_issue_relations |
|
453 | def test_issue_relations |
General Comments 0
You need to be logged in to leave comments.
Login now