test: replace "should_route" of "roles" to "assert_routing" at integration/routing_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8230 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f6dd3c5484
commit
08e309ea46
@ -158,13 +158,31 @@ class RoutingTest < ActionController::IntegrationTest
|
||||
)
|
||||
end
|
||||
|
||||
context "roles" do
|
||||
should_route :get, "/enumerations", :controller => 'enumerations', :action => 'index'
|
||||
should_route :get, "/enumerations/new", :controller => 'enumerations', :action => 'new'
|
||||
should_route :post, "/enumerations", :controller => 'enumerations', :action => 'create'
|
||||
should_route :get, "/enumerations/2/edit", :controller => 'enumerations', :action => 'edit', :id => 2
|
||||
should_route :put, "/enumerations/2", :controller => 'enumerations', :action => 'update', :id => 2
|
||||
should_route :delete, "/enumerations/2", :controller => 'enumerations', :action => 'destroy', :id => 2
|
||||
def test_roles
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/enumerations" },
|
||||
{ :controller => 'enumerations', :action => 'index' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/enumerations/new" },
|
||||
{ :controller => 'enumerations', :action => 'new' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/enumerations" },
|
||||
{ :controller => 'enumerations', :action => 'create' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/enumerations/2/edit" },
|
||||
{ :controller => 'enumerations', :action => 'edit', :id => '2' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'put', :path => "/enumerations/2" },
|
||||
{ :controller => 'enumerations', :action => 'update', :id => '2' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete', :path => "/enumerations/2" },
|
||||
{ :controller => 'enumerations', :action => 'destroy', :id => '2' }
|
||||
)
|
||||
end
|
||||
|
||||
def test_groups
|
||||
|
Loading…
x
Reference in New Issue
Block a user