@@ -555,18 +555,45 class RoutingTest < ActionController::IntegrationTest | |||
|
555 | 555 | ) |
|
556 | 556 | end |
|
557 | 557 | |
|
558 |
|
|
|
559 | should_route :get, "/projects/567/time_entries", :controller => 'timelog', :action => 'index', :project_id => '567' | |
|
560 | should_route :get, "/projects/567/time_entries.csv", :controller => 'timelog', :action => 'index', :project_id => '567', :format => 'csv' | |
|
561 |
|
|
|
562 | should_route :get, "/projects/567/time_entries/new", :controller => 'timelog', :action => 'new', :project_id => '567' | |
|
563 | should_route :get, "/projects/567/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :project_id => '567' | |
|
564 | ||
|
565 |
|
|
|
566 | ||
|
567 | should_route :put, "/projects/567/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :project_id => '567' | |
|
568 | ||
|
569 | should_route :delete, "/projects/567/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :project_id => '567' | |
|
558 | def test_timelogs_scoped_under_project | |
|
559 | assert_routing( | |
|
560 | { :method => 'get', :path => "/projects/567/time_entries" }, | |
|
561 | { :controller => 'timelog', :action => 'index', :project_id => '567' } | |
|
562 | ) | |
|
563 | assert_routing( | |
|
564 | { :method => 'get', :path => "/projects/567/time_entries.csv" }, | |
|
565 | { :controller => 'timelog', :action => 'index', :project_id => '567', | |
|
566 | :format => 'csv' } | |
|
567 | ) | |
|
568 | assert_routing( | |
|
569 | { :method => 'get', :path => "/projects/567/time_entries.atom" }, | |
|
570 | { :controller => 'timelog', :action => 'index', :project_id => '567', | |
|
571 | :format => 'atom' } | |
|
572 | ) | |
|
573 | assert_routing( | |
|
574 | { :method => 'get', :path => "/projects/567/time_entries/new" }, | |
|
575 | { :controller => 'timelog', :action => 'new', :project_id => '567' } | |
|
576 | ) | |
|
577 | assert_routing( | |
|
578 | { :method => 'get', :path => "/projects/567/time_entries/22/edit" }, | |
|
579 | { :controller => 'timelog', :action => 'edit', | |
|
580 | :id => '22', :project_id => '567' } | |
|
581 | ) | |
|
582 | assert_routing( | |
|
583 | { :method => 'post', :path => "/projects/567/time_entries" }, | |
|
584 | { :controller => 'timelog', :action => 'create', | |
|
585 | :project_id => '567' } | |
|
586 | ) | |
|
587 | assert_routing( | |
|
588 | { :method => 'put', :path => "/projects/567/time_entries/22" }, | |
|
589 | { :controller => 'timelog', :action => 'update', | |
|
590 | :id => '22', :project_id => '567' } | |
|
591 | ) | |
|
592 | assert_routing( | |
|
593 | { :method => 'delete', :path => "/projects/567/time_entries/55" }, | |
|
594 | { :controller => 'timelog', :action => 'destroy', | |
|
595 | :id => '55', :project_id => '567' } | |
|
596 | ) | |
|
570 | 597 | end |
|
571 | 598 | |
|
572 | 599 | context "timelogs (scoped under issues)" do |
General Comments 0
You need to be logged in to leave comments.
Login now