diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2019-04-27 07:38:01 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-04-27 07:38:01 +0300 |
commit | db6989ddb0dc1dc630803ea3748542779b5f9090 (patch) | |
tree | e582d413bcfb26195ec10543bb604fc802c38ae7 /spec/features | |
parent | 22ed1ba34b949f0c0619ea0a94de89ca987a1222 (diff) |
Add Let's Encrypt application settings
Store Let's Encrypt account email in application settings
Also add explicit terms of service consent
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_settings_spec.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index 3c9a9d61756..f9950b5b03f 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -375,6 +375,37 @@ describe 'Admin updates settings' do expect(Gitlab::CurrentSettings.pages_domain_verification_enabled?).to be_truthy expect(page).to have_content "Application settings saved successfully" end + + context 'When pages_auto_ssl is enabled' do + before do + stub_feature_flags(pages_auto_ssl: true) + visit preferences_admin_application_settings_path + end + + it "Change Pages Let's Encrypt settings" do + page.within('.as-pages') do + fill_in 'Email', with: 'my@test.example.com' + check "I have read and agree to the Let's Encrypt Terms of Service" + click_button 'Save changes' + end + + expect(Gitlab::CurrentSettings.lets_encrypt_notification_email).to eq 'my@test.example.com' + expect(Gitlab::CurrentSettings.lets_encrypt_terms_of_service_accepted).to eq true + end + end + + context 'When pages_auto_ssl is disabled' do + before do + stub_feature_flags(pages_auto_ssl: false) + visit preferences_admin_application_settings_path + end + + it "Doesn't show Let's Encrypt options" do + page.within('.as-pages') do + expect(page).not_to have_content('Email') + end + end + end end def check_all_events |