mirror of
https://github.com/redmine/redmine.git
synced 2025-11-07 05:45:49 +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,31 +17,14 @@
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingCustomFieldsTest < ActionDispatch::IntegrationTest
|
||||
class RoutingCustomFieldsTest < Redmine::RoutingTest
|
||||
def test_custom_fields
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/custom_fields" },
|
||||
{ :controller => 'custom_fields', :action => 'index' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/custom_fields/new" },
|
||||
{ :controller => 'custom_fields', :action => 'new' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/custom_fields" },
|
||||
{ :controller => 'custom_fields', :action => 'create' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/custom_fields/2/edit" },
|
||||
{ :controller => 'custom_fields', :action => 'edit', :id => '2' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'put', :path => "/custom_fields/2" },
|
||||
{ :controller => 'custom_fields', :action => 'update', :id => '2' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete', :path => "/custom_fields/2" },
|
||||
{ :controller => 'custom_fields', :action => 'destroy', :id => '2' }
|
||||
)
|
||||
should_route 'GET /custom_fields' => 'custom_fields#index'
|
||||
should_route 'GET /custom_fields/new' => 'custom_fields#new'
|
||||
should_route 'POST /custom_fields' => 'custom_fields#create'
|
||||
|
||||
should_route 'GET /custom_fields/2/edit' => 'custom_fields#edit', :id => '2'
|
||||
should_route 'PUT /custom_fields/2' => 'custom_fields#update', :id => '2'
|
||||
should_route 'DELETE /custom_fields/2' => 'custom_fields#destroy', :id => '2'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user