mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 23:36:01 +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,23 +17,11 @@
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingSysTest < ActionDispatch::IntegrationTest
|
||||
class RoutingSysTest < Redmine::RoutingTest
|
||||
def test_sys
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/sys/projects" },
|
||||
{ :controller => 'sys', :action => 'projects' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/sys/projects/testid/repository" },
|
||||
{ :controller => 'sys', :action => 'create_project_repository', :id => 'testid' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/sys/fetch_changesets" },
|
||||
{ :controller => 'sys', :action => 'fetch_changesets' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/sys/fetch_changesets" },
|
||||
{ :controller => 'sys', :action => 'fetch_changesets' }
|
||||
)
|
||||
should_route 'GET /sys/projects' => 'sys#projects'
|
||||
should_route 'POST /sys/projects/foo/repository' => 'sys#create_project_repository', :id => 'foo'
|
||||
should_route 'GET /sys/fetch_changesets' => 'sys#fetch_changesets'
|
||||
should_route 'POST /sys/fetch_changesets' => 'sys#fetch_changesets'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user