mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
GroupsController#show should only display visible users (#12795).
git-svn-id: http://svn.redmine.org/redmine/trunk@21113 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -81,6 +81,20 @@ class GroupsControllerTest < Redmine::ControllerTest
|
||||
assert_response 404
|
||||
end
|
||||
|
||||
def test_show_should_display_only_visible_users
|
||||
group = Group.find(10)
|
||||
locked_user = User.find(5)
|
||||
group.users << locked_user
|
||||
assert locked_user.locked?
|
||||
|
||||
@request.session[:user_id] = nil
|
||||
get :show, :params => {:id => group.id}
|
||||
assert_response :success
|
||||
|
||||
assert_select 'li', :text => 'User Misc'
|
||||
assert_select 'li', :text => locked_user.name, :count => 0
|
||||
end
|
||||
|
||||
def test_new
|
||||
get :new
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user