mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 14:26:04 +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,43 +17,16 @@
|
||||
|
||||
require File.expand_path('../../../test_helper', __FILE__)
|
||||
|
||||
class RoutingAuthSourcesTest < ActionDispatch::IntegrationTest
|
||||
class RoutingAuthSourcesTest < Redmine::RoutingTest
|
||||
def test_auth_sources
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/auth_sources" },
|
||||
{ :controller => 'auth_sources', :action => 'index' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/auth_sources/new" },
|
||||
{ :controller => 'auth_sources', :action => 'new' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/auth_sources" },
|
||||
{ :controller => 'auth_sources', :action => 'create' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/auth_sources/1234/edit" },
|
||||
{ :controller => 'auth_sources', :action => 'edit',
|
||||
:id => '1234' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'put', :path => "/auth_sources/1234" },
|
||||
{ :controller => 'auth_sources', :action => 'update',
|
||||
:id => '1234' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete', :path => "/auth_sources/1234" },
|
||||
{ :controller => 'auth_sources', :action => 'destroy',
|
||||
:id => '1234' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/auth_sources/1234/test_connection" },
|
||||
{ :controller => 'auth_sources', :action => 'test_connection',
|
||||
:id => '1234' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/auth_sources/autocomplete_for_new_user" },
|
||||
{ :controller => 'auth_sources', :action => 'autocomplete_for_new_user' }
|
||||
)
|
||||
should_route 'GET /auth_sources' => 'auth_sources#index'
|
||||
should_route 'GET /auth_sources/new' => 'auth_sources#new'
|
||||
should_route 'POST /auth_sources' => 'auth_sources#create'
|
||||
should_route 'GET /auth_sources/autocomplete_for_new_user' => 'auth_sources#autocomplete_for_new_user'
|
||||
|
||||
should_route 'GET /auth_sources/1234/edit' => 'auth_sources#edit', :id => '1234'
|
||||
should_route 'PUT /auth_sources/1234' => 'auth_sources#update', :id => '1234'
|
||||
should_route 'DELETE /auth_sources/1234' => 'auth_sources#destroy', :id => '1234'
|
||||
should_route 'GET /auth_sources/1234/test_connection' => 'auth_sources#test_connection', :id => '1234'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user