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:
Jean-Philippe Lang
2014-11-16 14:23:32 +00:00
parent d72e1f95ba
commit ecda1c7a4f
46 changed files with 539 additions and 1808 deletions

View File

@@ -17,25 +17,11 @@
require File.expand_path('../../../test_helper', __FILE__)
class RoutingIssueRelationsTest < ActionDispatch::IntegrationTest
class RoutingIssueRelationsTest < Redmine::RoutingTest
def test_issue_relations
assert_routing(
{ :method => 'get', :path => "/issues/1/relations" },
{ :controller => 'issue_relations', :action => 'index',
:issue_id => '1' }
)
assert_routing(
{ :method => 'post', :path => "/issues/1/relations" },
{ :controller => 'issue_relations', :action => 'create',
:issue_id => '1' }
)
assert_routing(
{ :method => 'get', :path => "/relations/23" },
{ :controller => 'issue_relations', :action => 'show', :id => '23' }
)
assert_routing(
{ :method => 'delete', :path => "/relations/23" },
{ :controller => 'issue_relations', :action => 'destroy', :id => '23' }
)
should_route 'GET /issues/1/relations' => 'issue_relations#index', :issue_id => '1'
should_route 'POST /issues/1/relations' => 'issue_relations#create', :issue_id => '1'
should_route 'DELETE /relations/23' => 'issue_relations#destroy', :id => '23'
end
end