diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-03-28 10:46:02 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-03-28 10:46:02 +0000 |
commit | cb94afc561c08db1b2312020e9d0a3e2f5837494 (patch) | |
tree | 7dd8be6196c242fbcd3a5a1b7c373f99dd5f6ae4 /spec | |
parent | 6e2384591a6adc4719b9ddc7ea434c4e3f6e0685 (diff) | |
parent | 686795eed3e3cf3dc9b7a0ba73e4c43540b5f3c6 (diff) | |
download | gitlab-ce-cb94afc561c08db1b2312020e9d0a3e2f5837494.tar.gz |
Merge branch '43794-fix-domain-verification-validation-errors' into 'master'
Resolve "ActiveRecord::RecordInvalid: Validation failed: Certificate misses intermediates"
Closes #43794
See merge request gitlab-org/gitlab-ce!17992
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/verify_pages_domain_service_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/services/verify_pages_domain_service_spec.rb b/spec/services/verify_pages_domain_service_spec.rb index 576db1dde2d..d974cc0226f 100644 --- a/spec/services/verify_pages_domain_service_spec.rb +++ b/spec/services/verify_pages_domain_service_spec.rb @@ -93,6 +93,25 @@ describe VerifyPagesDomainService do expect(domain).not_to be_enabled end end + + context 'invalid domain' do + let(:domain) { build(:pages_domain, :expired, :with_missing_chain) } + + before do + domain.save(validate: false) + end + + it 'can be disabled' do + error_status[:message] += '. It is now disabled.' + + stub_resolver + + expect(service.execute).to eq(error_status) + + expect(domain).not_to be_verified + expect(domain).not_to be_enabled + end + end end context 'timeout behaviour' do |