Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/groups/group_links_controller_spec.rb')
-rw-r--r--spec/controllers/groups/group_links_controller_spec.rb20
1 files changed, 18 insertions, 2 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