diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/controllers/groups/group_members_controller_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/controllers/groups/group_members_controller_spec.rb')
-rw-r--r-- | spec/controllers/groups/group_members_controller_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/controllers/groups/group_members_controller_spec.rb b/spec/controllers/groups/group_members_controller_spec.rb index c6fd184ede0..a3659ae9163 100644 --- a/spec/controllers/groups/group_members_controller_spec.rb +++ b/spec/controllers/groups/group_members_controller_spec.rb @@ -97,6 +97,25 @@ RSpec.describe Groups::GroupMembersController do expect(assigns(:members).map(&:user_id)).to contain_exactly(user.id) end end + + context 'when webui_members_inherited_users is disabled' do + let_it_be(:shared_group) { create(:group) } + let_it_be(:shared_group_user) { create(:user) } + let_it_be(:group_link) { create(:group_group_link, shared_group: shared_group, shared_with_group: group) } + + before do + group.add_owner(user) + shared_group.add_owner(shared_group_user) + stub_feature_flags(webui_members_inherited_users: false) + sign_in(user) + end + + it 'lists inherited group members only' do + get :index, params: { group_id: shared_group } + + expect(assigns(:members).map(&:user_id)).to contain_exactly(shared_group_user.id) + end + end end describe 'PUT update' do |