##// END OF EJS Templates
test: replace "should_route" of "timelogs (global)" to "assert_routing" at integration/routing_test.rb...
Toshi MARUYAMA -
r8122:e2de7f2529a1
parent child
Show More
@@ -520,18 +520,39 class RoutingTest < ActionController::IntegrationTest
520 should_route :post, "/roles/permissions", :controller => 'roles', :action => 'permissions'
520 should_route :post, "/roles/permissions", :controller => 'roles', :action => 'permissions'
521 end
521 end
522
522
523 context "timelogs (global)" do
523 def test_timelogs_global
524 should_route :get, "/time_entries", :controller => 'timelog', :action => 'index'
524 assert_routing(
525 should_route :get, "/time_entries.csv", :controller => 'timelog', :action => 'index', :format => 'csv'
525 { :method => 'get', :path => "/time_entries" },
526 should_route :get, "/time_entries.atom", :controller => 'timelog', :action => 'index', :format => 'atom'
526 { :controller => 'timelog', :action => 'index' }
527 should_route :get, "/time_entries/new", :controller => 'timelog', :action => 'new'
527 )
528 should_route :get, "/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22'
528 assert_routing(
529
529 { :method => 'get', :path => "/time_entries.csv" },
530 should_route :post, "/time_entries", :controller => 'timelog', :action => 'create'
530 { :controller => 'timelog', :action => 'index', :format => 'csv' }
531
531 )
532 should_route :put, "/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22'
532 assert_routing(
533
533 { :method => 'get', :path => "/time_entries.atom" },
534 should_route :delete, "/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55'
534 { :controller => 'timelog', :action => 'index', :format => 'atom' }
535 )
536 assert_routing(
537 { :method => 'get', :path => "/time_entries/new" },
538 { :controller => 'timelog', :action => 'new' }
539 )
540 assert_routing(
541 { :method => 'get', :path => "/time_entries/22/edit" },
542 { :controller => 'timelog', :action => 'edit', :id => '22' }
543 )
544 assert_routing(
545 { :method => 'post', :path => "/time_entries" },
546 { :controller => 'timelog', :action => 'create' }
547 )
548 assert_routing(
549 { :method => 'put', :path => "/time_entries/22" },
550 { :controller => 'timelog', :action => 'update', :id => '22' }
551 )
552 assert_routing(
553 { :method => 'delete', :path => "/time_entries/55" },
554 { :controller => 'timelog', :action => 'destroy', :id => '55' }
555 )
535 end
556 end
536
557
537 context "timelogs (scoped under project)" do
558 context "timelogs (scoped under project)" do
General Comments 0
You need to be logged in to leave comments. Login now