Add link from group name to group page on project overview page (#12795).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@21073 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2021-07-19 15:13:58 +00:00
parent 482656fb2c
commit 56a7fd22c7
3 changed files with 31 additions and 9 deletions

View File

@@ -1708,6 +1708,17 @@ class ApplicationHelperTest < Redmine::HelperTest
end
end
def test_link_to_principal_should_link_to_user
user = User.find(2)
assert_equal link_to_user(user), link_to_principal(user)
end
def test_link_to_principal_should_link_to_group
group = Group.find(10)
result = link_to('A Team', '/groups/10', :class => 'group icon icon-group')
assert_equal result, link_to_principal(group)
end
def test_link_to_group_should_return_only_group_name_for_non_admin_users
User.current = nil
group = Group.find(10)