diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-07 15:07:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-07 15:07:55 +0300 |
commit | 05f1d5d9813332bdd456cb358517e56168a24224 (patch) | |
tree | f9ed7a2692a537b5e1e541318f39d7464fdd8098 /spec/workers | |
parent | e440c86979e9c02a09fb6558f59a1fbe29433b51 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/self_monitoring_project_create_worker_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/workers/self_monitoring_project_create_worker_spec.rb b/spec/workers/self_monitoring_project_create_worker_spec.rb new file mode 100644 index 00000000000..75c4f5d49d1 --- /dev/null +++ b/spec/workers/self_monitoring_project_create_worker_spec.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe SelfMonitoringProjectCreateWorker do + describe '#perform' do + let(:service_class) { Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService } + let(:service) { instance_double(service_class) } + + before do + allow(service_class).to receive(:new) { service } + end + + it 'runs the SelfMonitoring::Project::CreateService' do + expect(service).to receive(:execute) + + subject.perform + end + end + + describe '.in_progress?', :clean_gitlab_redis_shared_state do + it 'returns in_progress when job is enqueued' do + jid = described_class.perform_async + + expect(described_class.in_progress?(jid)).to eq(true) + end + end +end |