mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 01:06:00 +01:00
Display user's groups on profile (#12796).
Only for admins or when viewing its own profile. git-svn-id: http://svn.redmine.org/redmine/trunk@17973 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -112,6 +112,9 @@ class UsersControllerTest < Redmine::ControllerTest
|
||||
get :show, :params => {:id => 2}
|
||||
assert_response :success
|
||||
assert_select 'h2', :text => /John Smith/
|
||||
|
||||
# groups block should not be rendeder for users which are not part of any group
|
||||
assert_select 'div#groups', 0
|
||||
end
|
||||
|
||||
def test_show_should_display_visible_custom_fields
|
||||
@@ -206,6 +209,18 @@ class UsersControllerTest < Redmine::ControllerTest
|
||||
end
|
||||
end
|
||||
|
||||
def test_show_user_should_list_user_groups
|
||||
@request.session[:user_id] = 1
|
||||
get :show, :params => {:id => 8}
|
||||
|
||||
assert_select 'div#groups', 1 do
|
||||
assert_select 'h3', :text => 'Groups'
|
||||
assert_select 'li', 2
|
||||
assert_select 'a[href=?]', '/groups/10/edit', :text => 'A Team'
|
||||
assert_select 'a[href=?]', '/groups/11/edit', :text => 'B Team'
|
||||
end
|
||||
end
|
||||
|
||||
def test_new
|
||||
get :new
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user