@@ -593,15 +593,39 class RoutingTest < ActionController::IntegrationTest | |||
|
593 | 593 | ) |
|
594 | 594 | end |
|
595 | 595 | |
|
596 | context "roles" do | |
|
597 | should_route :get, "/roles", :controller => 'roles', :action => 'index' | |
|
598 | should_route :get, "/roles/new", :controller => 'roles', :action => 'new' | |
|
599 |
|
|
|
600 | should_route :get, "/roles/2/edit", :controller => 'roles', :action => 'edit', :id => 2 | |
|
601 | should_route :put, "/roles/2", :controller => 'roles', :action => 'update', :id => 2 | |
|
602 | should_route :delete, "/roles/2", :controller => 'roles', :action => 'destroy', :id => 2 | |
|
603 |
|
|
|
604 | should_route :post, "/roles/permissions", :controller => 'roles', :action => 'permissions' | |
|
596 | def test_roles | |
|
597 | assert_routing( | |
|
598 | { :method => 'get', :path => "/roles" }, | |
|
599 | { :controller => 'roles', :action => 'index' } | |
|
600 | ) | |
|
601 | assert_routing( | |
|
602 | { :method => 'get', :path => "/roles/new" }, | |
|
603 | { :controller => 'roles', :action => 'new' } | |
|
604 | ) | |
|
605 | assert_routing( | |
|
606 | { :method => 'post', :path => "/roles" }, | |
|
607 | { :controller => 'roles', :action => 'create' } | |
|
608 | ) | |
|
609 | assert_routing( | |
|
610 | { :method => 'get', :path => "/roles/2/edit" }, | |
|
611 | { :controller => 'roles', :action => 'edit', :id => '2' } | |
|
612 | ) | |
|
613 | assert_routing( | |
|
614 | { :method => 'put', :path => "/roles/2" }, | |
|
615 | { :controller => 'roles', :action => 'update', :id => '2' } | |
|
616 | ) | |
|
617 | assert_routing( | |
|
618 | { :method => 'delete', :path => "/roles/2" }, | |
|
619 | { :controller => 'roles', :action => 'destroy', :id => '2' } | |
|
620 | ) | |
|
621 | assert_routing( | |
|
622 | { :method => 'get', :path => "/roles/permissions" }, | |
|
623 | { :controller => 'roles', :action => 'permissions' } | |
|
624 | ) | |
|
625 | assert_routing( | |
|
626 | { :method => 'post', :path => "/roles/permissions" }, | |
|
627 | { :controller => 'roles', :action => 'permissions' } | |
|
628 | ) | |
|
605 | 629 | end |
|
606 | 630 | |
|
607 | 631 | def test_timelogs_global |
General Comments 0
You need to be logged in to leave comments.
Login now