mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 07:16:03 +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,24 +17,13 @@
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingSettingsTest < ActionDispatch::IntegrationTest
|
||||
class RoutingSettingsTest < Redmine::RoutingTest
|
||||
def test_settings
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/settings" },
|
||||
{ :controller => 'settings', :action => 'index' }
|
||||
)
|
||||
["get", "post"].each do |method|
|
||||
assert_routing(
|
||||
{ :method => method, :path => "/settings/edit" },
|
||||
{ :controller => 'settings', :action => 'edit' }
|
||||
)
|
||||
end
|
||||
["get", "post"].each do |method|
|
||||
assert_routing(
|
||||
{ :method => method, :path => "/settings/plugin/testid" },
|
||||
{ :controller => 'settings', :action => 'plugin',
|
||||
:id => 'testid' }
|
||||
)
|
||||
end
|
||||
should_route 'GET /settings' => 'settings#index'
|
||||
should_route 'GET /settings/edit' => 'settings#edit'
|
||||
should_route 'POST /settings/edit' => 'settings#edit'
|
||||
|
||||
should_route 'GET /settings/plugin/testid' => 'settings#plugin', :id => 'testid'
|
||||
should_route 'POST /settings/plugin/testid' => 'settings#plugin', :id => 'testid'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user