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/services/admin/set_feature_flag_service_spec.rb')
-rw-r--r--spec/services/admin/set_feature_flag_service_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/admin/set_feature_flag_service_spec.rb b/spec/services/admin/set_feature_flag_service_spec.rb
index 6fa806644c9..9a9c5545e23 100644
--- a/spec/services/admin/set_feature_flag_service_spec.rb
+++ b/spec/services/admin/set_feature_flag_service_spec.rb
@@ -130,6 +130,15 @@ RSpec.describe Admin::SetFeatureFlagService do
end
end
+ context 'when enabling for a repository' do
+ let(:params) { { value: 'true', repository: project.repository.full_path } }
+
+ it 'enables the feature flag' do
+ expect(Feature).to receive(:enable).with(feature_name, project.repository)
+ expect(subject).to be_success
+ end
+ end
+
context 'when enabling for a user actor and a feature group' do
let(:params) { { value: 'true', user: user.username, feature_group: 'perf_team' } }
let(:feature_group) { Feature.group('perf_team') }