diff options
author | Nick Thomas <nick@gitlab.com> | 2018-03-26 14:54:59 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-03-26 15:07:01 +0100 |
commit | 686795eed3e3cf3dc9b7a0ba73e4c43540b5f3c6 (patch) | |
tree | 5b75e251b651f3b9540d308e7bfa9789fe3705ff /spec | |
parent | f6eeb1350b93d1cfce401695aa77c8464f26f26b (diff) | |
download | gitlab-ce-686795eed3e3cf3dc9b7a0ba73e4c43540b5f3c6.tar.gz |
Allow pages domain verification to run on invalid domains
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 |