summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-07-31 00:53:08 +0000
committerGo MAEDA <maeda@farend.jp>2021-07-31 00:53:08 +0000
commitf479070c39dbf3f088f211a065e1e32da84d7502 (patch)
treeaf66e4ddbf7cf5f1f1620f452a2f2196a172604e /test/functional
parentbef39fdbb4e66ba691eec2537814a9e736c13e09 (diff)
downloadredmine-f479070c39dbf3f088f211a065e1e32da84d7502.tar.gz
redmine-f479070c39dbf3f088f211a065e1e32da84d7502.zip
GroupsController#show should only display visible users (#12795).
git-svn-id: http://svn.redmine.org/redmine/trunk@21113 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/groups_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/groups_controller_test.rb b/test/functional/groups_controller_test.rb
index efb588198..c62aa5a7d 100644
--- a/test/functional/groups_controller_test.rb
+++ b/test/functional/groups_controller_test.rb
@@ -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