mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 22:36:02 +01:00
Use should_route in routing tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13608 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -17,29 +17,16 @@
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingWorkflowsTest < ActionDispatch::IntegrationTest
|
||||
class RoutingWorkflowsTest < Redmine::RoutingTest
|
||||
def test_workflows
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/workflows" },
|
||||
{ :controller => 'workflows', :action => 'index' }
|
||||
)
|
||||
["get", "post"].each do |method|
|
||||
assert_routing(
|
||||
{ :method => method, :path => "/workflows/edit" },
|
||||
{ :controller => 'workflows', :action => 'edit' }
|
||||
)
|
||||
end
|
||||
["get", "post"].each do |method|
|
||||
assert_routing(
|
||||
{ :method => method, :path => "/workflows/permissions" },
|
||||
{ :controller => 'workflows', :action => 'permissions' }
|
||||
)
|
||||
end
|
||||
["get", "post"].each do |method|
|
||||
assert_routing(
|
||||
{ :method => method, :path => "/workflows/copy" },
|
||||
{ :controller => 'workflows', :action => 'copy' }
|
||||
)
|
||||
end
|
||||
should_route 'GET /workflows' => 'workflows#index'
|
||||
should_route 'GET /workflows/edit' => 'workflows#edit'
|
||||
should_route 'POST /workflows/edit' => 'workflows#edit'
|
||||
|
||||
should_route 'GET /workflows/permissions' => 'workflows#permissions'
|
||||
should_route 'POST /workflows/permissions' => 'workflows#permissions'
|
||||
|
||||
should_route 'GET /workflows/copy' => 'workflows#copy'
|
||||
should_route 'POST /workflows/copy' => 'workflows#copy'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user