@@ -392,22 +392,65 class RoutingTest < ActionController::IntegrationTest | |||||
392 | should_route :delete, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'json' |
|
392 | should_route :delete, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'json' | |
393 | end |
|
393 | end | |
394 |
|
394 | |||
395 |
|
|
395 | def test_issue_relations | |
396 | should_route :get, "/issues/1/relations", :controller => 'issue_relations', :action => 'index', :issue_id => '1' |
|
396 | assert_routing( | |
397 | should_route :get, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'xml' |
|
397 | { :method => 'get', :path => "/issues/1/relations" }, | |
398 | should_route :get, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'json' |
|
398 | { :controller => 'issue_relations', :action => 'index', | |
399 |
|
399 | :issue_id => '1' } | ||
400 | should_route :post, "/issues/1/relations", :controller => 'issue_relations', :action => 'create', :issue_id => '1' |
|
400 | ) | |
401 | should_route :post, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'xml' |
|
401 | assert_routing( | |
402 | should_route :post, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'json' |
|
402 | { :method => 'get', :path => "/issues/1/relations.xml" }, | |
403 |
|
403 | { :controller => 'issue_relations', :action => 'index', | ||
404 | should_route :get, "/relations/23", :controller => 'issue_relations', :action => 'show', :id => '23' |
|
404 | :issue_id => '1', :format => 'xml' } | |
405 | should_route :get, "/relations/23.xml", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'xml' |
|
405 | ) | |
406 | should_route :get, "/relations/23.json", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'json' |
|
406 | assert_routing( | |
407 |
|
407 | { :method => 'get', :path => "/issues/1/relations.json" }, | ||
408 |
|
|
408 | { :controller => 'issue_relations', :action => 'index', | |
409 | should_route :delete, "/relations/23.xml", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'xml' |
|
409 | :issue_id => '1', :format => 'json' } | |
410 | should_route :delete, "/relations/23.json", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'json' |
|
410 | ) | |
|
411 | assert_routing( | |||
|
412 | { :method => 'post', :path => "/issues/1/relations" }, | |||
|
413 | { :controller => 'issue_relations', :action => 'create', | |||
|
414 | :issue_id => '1' } | |||
|
415 | ) | |||
|
416 | assert_routing( | |||
|
417 | { :method => 'post', :path => "/issues/1/relations.xml" }, | |||
|
418 | { :controller => 'issue_relations', :action => 'create', | |||
|
419 | :issue_id => '1', :format => 'xml' } | |||
|
420 | ) | |||
|
421 | assert_routing( | |||
|
422 | { :method => 'post', :path => "/issues/1/relations.json" }, | |||
|
423 | { :controller => 'issue_relations', :action => 'create', | |||
|
424 | :issue_id => '1', :format => 'json' } | |||
|
425 | ) | |||
|
426 | assert_routing( | |||
|
427 | { :method => 'get', :path => "/relations/23" }, | |||
|
428 | { :controller => 'issue_relations', :action => 'show', :id => '23' } | |||
|
429 | ) | |||
|
430 | assert_routing( | |||
|
431 | { :method => 'get', :path => "/relations/23.xml" }, | |||
|
432 | { :controller => 'issue_relations', :action => 'show', :id => '23', | |||
|
433 | :format => 'xml' } | |||
|
434 | ) | |||
|
435 | assert_routing( | |||
|
436 | { :method => 'get', :path => "/relations/23.json" }, | |||
|
437 | { :controller => 'issue_relations', :action => 'show', :id => '23', | |||
|
438 | :format => 'json' } | |||
|
439 | ) | |||
|
440 | assert_routing( | |||
|
441 | { :method => 'delete', :path => "/relations/23" }, | |||
|
442 | { :controller => 'issue_relations', :action => 'destroy', :id => '23' } | |||
|
443 | ) | |||
|
444 | assert_routing( | |||
|
445 | { :method => 'delete', :path => "/relations/23.xml" }, | |||
|
446 | { :controller => 'issue_relations', :action => 'destroy', :id => '23', | |||
|
447 | :format => 'xml' } | |||
|
448 | ) | |||
|
449 | assert_routing( | |||
|
450 | { :method => 'delete', :path => "/relations/23.json" }, | |||
|
451 | { :controller => 'issue_relations', :action => 'destroy', :id => '23', | |||
|
452 | :format => 'json' } | |||
|
453 | ) | |||
411 | end |
|
454 | end | |
412 |
|
455 | |||
413 | def test_issue_reports |
|
456 | def test_issue_reports |
General Comments 0
You need to be logged in to leave comments.
Login now