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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-28 06:12:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-28 06:12:02 +0300
commit26169f534ccd8a387681dce7b389493bfffb2896 (patch)
tree53dc6a791b6249da97aea28df4073345c5c27009 /spec/requests/api/group_export_spec.rb
parentbbe7abcfbd53a824b3ad493e7ddf2fbe485ee42f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/group_export_spec.rb')
-rw-r--r--spec/requests/api/group_export_spec.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/spec/requests/api/group_export_spec.rb b/spec/requests/api/group_export_spec.rb
index ddee2081bcf..d0f7c000544 100644
--- a/spec/requests/api/group_export_spec.rb
+++ b/spec/requests/api/group_export_spec.rb
@@ -325,13 +325,32 @@ RSpec.describe API::GroupExport, feature_category: :importers do
end
context 'when bulk import is disabled' do
+ subject(:request) { post api(path, user) }
+
before do
stub_application_setting(bulk_import_enabled: false)
+ stub_feature_flags(override_bulk_import_disabled: false)
end
it_behaves_like '404 response' do
let(:message) { '404 Not Found' }
- let(:request) { post api(path, user) }
+ end
+
+ it 'enables the feature when override flag is enabled for the user' do
+ stub_feature_flags(override_bulk_import_disabled: user)
+
+ request
+
+ expect(response).to have_gitlab_http_status(:accepted)
+ end
+
+ it 'does not enable the feature when override flag is enabled for another user' do
+ other_user = create(:user)
+ stub_feature_flags(override_bulk_import_disabled: other_user)
+
+ request
+
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
end