Adds a "Manage related isses" permission to add/remove commits/issues relations manually from the changeset view (#2009).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8777 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -341,6 +341,32 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
||||
)
|
||||
end
|
||||
|
||||
def test_repositories_related_issues
|
||||
assert_routing(
|
||||
{ :method => 'post',
|
||||
:path => "/projects/redmine/repository/revisions/123/issues" },
|
||||
{ :controller => 'repositories', :action => 'add_related_issue', :id => 'redmine', :rev => '123' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete',
|
||||
:path => "/projects/redmine/repository/revisions/123/issues/25" },
|
||||
{ :controller => 'repositories', :action => 'remove_related_issue', :id => 'redmine', :rev => '123', :issue_id => '25' }
|
||||
)
|
||||
end
|
||||
|
||||
def test_repositories_related_issues_with_repository_id
|
||||
assert_routing(
|
||||
{ :method => 'post',
|
||||
:path => "/projects/redmine/repository/foo/revisions/123/issues" },
|
||||
{ :controller => 'repositories', :action => 'add_related_issue', :id => 'redmine', :repository_id => 'foo', :rev => '123' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete',
|
||||
:path => "/projects/redmine/repository/foo/revisions/123/issues/25" },
|
||||
{ :controller => 'repositories', :action => 'remove_related_issue', :id => 'redmine', :repository_id => 'foo', :rev => '123', :issue_id => '25' }
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def repository_path_hash(arr)
|
||||
|
||||
Reference in New Issue
Block a user