diff options
author | Nick Thomas <nick@gitlab.com> | 2017-06-06 17:55:12 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-06-06 18:04:26 +0300 |
commit | 5c602e306cdf979a70aaa81cd473f491f2eee45a (patch) | |
tree | e1c1d5490f74b9ae44ecb8b91712c7b54c139ec7 /spec/controllers/admin | |
parent | 2f02843fe9fbcbef09ef8f122e9a84d809f2c29a (diff) |
Limit non-administrators to adding 100 members at a time to groups and projects
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r-- | spec/controllers/admin/groups_controller_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/admin/groups_controller_spec.rb b/spec/controllers/admin/groups_controller_spec.rb index c29b2fe8946..ddf38967dd7 100644 --- a/spec/controllers/admin/groups_controller_spec.rb +++ b/spec/controllers/admin/groups_controller_spec.rb @@ -36,6 +36,15 @@ describe Admin::GroupsController do expect(group.users).to include group_user end + it 'can add unlimited members' do + put :members_update, id: group, + user_ids: 1.upto(1000).to_a.join(','), + access_level: Gitlab::Access::GUEST + + expect(response).to set_flash.to 'Users were successfully added.' + expect(response).to redirect_to(admin_group_path(group)) + end + it 'adds no user to members' do put :members_update, id: group, user_ids: '', |