mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 09:16: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,19 +17,10 @@
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingFilesTest < ActionDispatch::IntegrationTest
|
||||
class RoutingFilesTest < Redmine::RoutingTest
|
||||
def test_files
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/33/files" },
|
||||
{ :controller => 'files', :action => 'index', :project_id => '33' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/33/files/new" },
|
||||
{ :controller => 'files', :action => 'new', :project_id => '33' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/projects/33/files" },
|
||||
{ :controller => 'files', :action => 'create', :project_id => '33' }
|
||||
)
|
||||
should_route 'GET /projects/foo/files' => 'files#index', :project_id => 'foo'
|
||||
should_route 'GET /projects/foo/files/new' => 'files#new', :project_id => 'foo'
|
||||
should_route 'POST /projects/foo/files' => 'files#create', :project_id => 'foo'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user