diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 18:40:28 +0300 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/controllers/groups | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/controllers/groups')
-rw-r--r-- | spec/controllers/groups/group_links_controller_spec.rb | 20 | ||||
-rw-r--r-- | spec/controllers/groups/variables_controller_spec.rb | 2 |
2 files changed, 19 insertions, 3 deletions
diff --git a/spec/controllers/groups/group_links_controller_spec.rb b/spec/controllers/groups/group_links_controller_spec.rb index 28febd786de..7322ca5e522 100644 --- a/spec/controllers/groups/group_links_controller_spec.rb +++ b/spec/controllers/groups/group_links_controller_spec.rb @@ -131,8 +131,24 @@ RSpec.describe Groups::GroupLinksController do expect { subject }.to change(GroupGroupLink, :count).by(-1) end - it 'updates project permissions', :sidekiq_inline do - expect { subject }.to change { group_member.can?(:create_release, project) }.from(true).to(false) + context 'with skip_group_share_unlink_auth_refresh feature flag disabled' do + before do + stub_feature_flags(skip_group_share_unlink_auth_refresh: false) + end + + it 'updates project permissions', :sidekiq_inline do + expect { subject }.to change { group_member.can?(:create_release, project) }.from(true).to(false) + end + end + + context 'with skip_group_share_unlink_auth_refresh feature flag enabled' do + before do + stub_feature_flags(skip_group_share_unlink_auth_refresh: true) + end + + it 'maintains project authorization', :sidekiq_inline do + expect(Ability.allowed?(user, :read_project, project)).to be_truthy + end end end diff --git a/spec/controllers/groups/variables_controller_spec.rb b/spec/controllers/groups/variables_controller_spec.rb index 8c0aa83b9c4..6dbe75bb1df 100644 --- a/spec/controllers/groups/variables_controller_spec.rb +++ b/spec/controllers/groups/variables_controller_spec.rb @@ -13,7 +13,7 @@ RSpec.describe Groups::VariablesController do before do sign_in(user) - group.add_user(user, access_level) + group.add_member(user, access_level) end describe 'GET #show' do |