diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-05 10:56:27 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-05 10:56:27 +0000 |
commit | 1d4ef8964def4ecbe7a11485f72d7fbe61c55724 (patch) | |
tree | 4986d5f51daebd1ff66ac58cdf56042624e2edc3 /test/integration/routing | |
parent | c4ea429acbc09205155509e9c41e111294bc8f82 (diff) | |
download | redmine-1d4ef8964def4ecbe7a11485f72d7fbe61c55724.tar.gz redmine-1d4ef8964def4ecbe7a11485f72d7fbe61c55724.zip |
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
Diffstat (limited to 'test/integration/routing')
-rw-r--r-- | test/integration/routing/repositories_test.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb index 5b2ccbcac..44fe7309e 100644 --- a/test/integration/routing/repositories_test.rb +++ b/test/integration/routing/repositories_test.rb @@ -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) |