diff options
| author | Brett Walker <bwalker@gitlab.com> | 2019-02-20 10:56:19 -0600 |
|---|---|---|
| committer | Brett Walker <bwalker@gitlab.com> | 2019-06-19 12:29:10 -0500 |
| commit | 6b4f93c0349e9d54cb48f1d5cf025c5e5ce77aee (patch) | |
| tree | 422fdbc63f17d7836fe2cff92586b59a5febd3d0 /spec/features/admin | |
| parent | e999e1de7baadc34e7fccf76e76991a7adf31b0e (diff) | |
| download | gitlab-ce-6b4f93c0349e9d54cb48f1d5cf025c5e5ce77aee.tar.gz | |
Update application settings using correct action
Updating multiple application settings panels through
a single action causes the incorrect action to be shown
when there are errors. Instead, make each panel action
handle both updating and display.
Diffstat (limited to 'spec/features/admin')
| -rw-r--r-- | spec/features/admin/admin_settings_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index 93ccb03d822..45ef5d07ff0 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -379,6 +379,27 @@ describe 'Admin updates settings' do expect(page).to have_content "Application settings saved successfully" end + it 'Change Real-time features settings' do + page.within('.as-realtime') do + fill_in 'Polling interval multiplier', with: 5.0 + click_button 'Save changes' + end + + expect(Gitlab::CurrentSettings.polling_interval_multiplier).to eq 5.0 + expect(page).to have_content "Application settings saved successfully" + end + + it 'shows an error when validation fails' do + page.within('.as-realtime') do + fill_in 'Polling interval multiplier', with: -1.0 + click_button 'Save changes' + end + + expect(Gitlab::CurrentSettings.polling_interval_multiplier).not_to eq(-1.0) + expect(page) + .to have_content "The form contains the following error: Polling interval multiplier must be greater than or equal to 0" + end + context 'When pages_auto_ssl is enabled' do before do stub_feature_flags(pages_auto_ssl: true) |
