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>2022-10-14 15:10:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-14 15:10:40 +0300
commita0d49dc011304985a8fd8a7ab337c003995c8ae1 (patch)
treea596d7ca659be1c02f5cce4d1f7a217c2ca153d6 /spec/features
parentefcfe56681dc8bd586e6ef56d1dc7df05a93197d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/admin/admin_settings_spec.rb36
1 files changed, 8 insertions, 28 deletions
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb
index b2e86112d98..9e7666b920f 100644
--- a/spec/features/admin/admin_settings_spec.rb
+++ b/spec/features/admin/admin_settings_spec.rb
@@ -400,39 +400,19 @@ RSpec.describe 'Admin updates settings' do
end
context 'Runner Registration' do
- context 'when feature is enabled' do
- before do
- stub_feature_flags(runner_registration_control: true)
- end
-
- it 'allows admins to control who has access to register runners' do
- visit ci_cd_admin_application_settings_path
-
- expect(current_settings.valid_runner_registrars).to eq(ApplicationSetting::VALID_RUNNER_REGISTRAR_TYPES)
+ it 'allows admins to control who has access to register runners' do
+ visit ci_cd_admin_application_settings_path
- page.within('.as-runner') do
- find_all('input[type="checkbox"]').each(&:click)
+ expect(current_settings.valid_runner_registrars).to eq(ApplicationSetting::VALID_RUNNER_REGISTRAR_TYPES)
- click_button 'Save changes'
- end
-
- expect(current_settings.valid_runner_registrars).to eq([])
- expect(page).to have_content "Application settings saved successfully"
- end
- end
+ page.within('.as-runner') do
+ find_all('input[type="checkbox"]').each(&:click)
- context 'when feature is disabled' do
- before do
- stub_feature_flags(runner_registration_control: false)
+ click_button 'Save changes'
end
- it 'does not allow admins to control who has access to register runners' do
- visit ci_cd_admin_application_settings_path
-
- expect(current_settings.valid_runner_registrars).to eq(ApplicationSetting::VALID_RUNNER_REGISTRAR_TYPES)
-
- expect(page).not_to have_css('.as-runner')
- end
+ expect(current_settings.valid_runner_registrars).to eq([])
+ expect(page).to have_content "Application settings saved successfully"
end
end