diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-02-28 15:40:52 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-02-28 15:40:52 +0000 |
commit | b5b8dc83cc1bb271877c79532ecfb555540672a7 (patch) | |
tree | 190f6cd6991cbfbabbd670a7aac5ff36eb1a64bb /spec/features/projects/pages_spec.rb | |
parent | deef09cd1f0dbe5cab5095ff02f19a5c3588cb91 (diff) | |
parent | ff2f57da791890957fe97efd46f5c34f270a0c46 (diff) | |
download | gitlab-ce-dispatcher-cycle-analytics.tar.gz |
Merge branch 'master' into 'dispatcher-cycle-analytics'dispatcher-cycle-analytics
# Conflicts:
# config/webpack.config.js
Diffstat (limited to 'spec/features/projects/pages_spec.rb')
-rw-r--r-- | spec/features/projects/pages_spec.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/features/projects/pages_spec.rb b/spec/features/projects/pages_spec.rb index a96f2c186a4..2a0d235ef04 100644 --- a/spec/features/projects/pages_spec.rb +++ b/spec/features/projects/pages_spec.rb @@ -160,6 +160,37 @@ feature 'Pages' do expect(page).to have_content('my.test.domain.com') end + + describe 'updating the certificate for an existing domain' do + let!(:domain) do + create(:pages_domain, :with_key, :with_certificate, project: project) + end + + it 'allows the certificate to be updated' do + visit project_pages_path(project) + + within('#content-body') { click_link 'Details' } + click_link 'Edit' + click_button 'Save Changes' + + expect(page).to have_content('Domain was updated') + end + + context 'when the certificate is invalid' do + it 'tells the user what the problem is' do + visit project_pages_path(project) + + within('#content-body') { click_link 'Details' } + click_link 'Edit' + fill_in 'Certificate (PEM)', with: 'invalid data' + click_button 'Save Changes' + + expect(page).to have_content('Certificate must be a valid PEM certificate') + expect(page).to have_content('Certificate misses intermediates') + expect(page).to have_content("Key doesn't match the certificate") + end + end + end end end |