Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-02-06 16:25:46 +0300
committerNick Thomas <nick@gitlab.com>2018-02-23 15:22:29 +0300
commitee68bd9771f671ce7c258a8f5441125f1a9c2d53 (patch)
tree965830e9733bf7ee60e1971c93d1c91b9d584db5 /spec/workers/pages_domain_verification_cron_worker_spec.rb
parent58a312f5097b30a93100de93d06427402d514b48 (diff)
Add DNS verification to Pages custom domains
Diffstat (limited to 'spec/workers/pages_domain_verification_cron_worker_spec.rb')
-rw-r--r--spec/workers/pages_domain_verification_cron_worker_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/workers/pages_domain_verification_cron_worker_spec.rb b/spec/workers/pages_domain_verification_cron_worker_spec.rb
new file mode 100644
index 00000000000..8f780428c82
--- /dev/null
+++ b/spec/workers/pages_domain_verification_cron_worker_spec.rb
@@ -0,0 +1,21 @@
+require 'spec_helper'
+
+describe PagesDomainVerificationCronWorker do
+ subject(:worker) { described_class.new }
+
+ describe '#perform' do
+ it 'enqueues a PagesDomainVerificationWorker for domains needing verification' do
+ verified = create(:pages_domain)
+ reverify = create(:pages_domain, :reverify)
+ disabled = create(:pages_domain, :disabled)
+
+ [reverify, disabled].each do |domain|
+ expect(PagesDomainVerificationWorker).to receive(:perform_async).with(domain.id)
+ end
+
+ expect(PagesDomainVerificationWorker).not_to receive(:perform_async).with(verified.id)
+
+ worker.perform
+ end
+ end
+end