mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Invalid links to versions with sharing in project tree (#32860).
Patch by Alexander Meindl. git-svn-id: http://svn.redmine.org/redmine/trunk@20149 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -42,7 +42,7 @@ class VersionsHelperTest < Redmine::HelperTest
|
||||
def test_version_filtered_issues_path_sharing_hierarchy
|
||||
version = Version.new(:name => 'test', :sharing => 'hierarchy')
|
||||
version.project = Project.find(5)
|
||||
assert_match '/projects/ecookbook/issues?', version_filtered_issues_path(version)
|
||||
assert_match '/projects/private-child/issues?', version_filtered_issues_path(version)
|
||||
end
|
||||
|
||||
def test_version_filtered_issues_path_sharing_tree
|
||||
@@ -51,6 +51,14 @@ class VersionsHelperTest < Redmine::HelperTest
|
||||
assert_match '/projects/ecookbook/issues?', version_filtered_issues_path(version)
|
||||
end
|
||||
|
||||
def test_version_filtered_issues_path_sharing_tree_without_permission_to_root_project
|
||||
EnabledModule.where("name = 'issue_tracking' AND project_id = 1").delete_all
|
||||
version = Version.new(:name => 'test', :sharing => 'tree')
|
||||
version.project = Project.find(5)
|
||||
assert_no_match '/projects/ecookbook/issues?', version_filtered_issues_path(version)
|
||||
assert_match '/issues?', version_filtered_issues_path(version)
|
||||
end
|
||||
|
||||
def test_version_filtered_issues_path_sharing_system
|
||||
version = Version.new(:name => 'test', :sharing => 'system')
|
||||
version.project = Project.find(5)
|
||||
|
||||
Reference in New Issue
Block a user