diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-30 12:08:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-30 12:08:07 +0300 |
commit | d08bee6aaf36fb6cd922f130f5596484c64562c0 (patch) | |
tree | 2476df6e22109ff9fa04db96a8867b2411cf7d5c /spec/workers | |
parent | 28fd41cf28bfac77fe877b6cce83594c1f9f21a1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/gitlab_usage_ping_worker_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/workers/gitlab_usage_ping_worker_spec.rb b/spec/workers/gitlab_usage_ping_worker_spec.rb index f282b20363c..ff60c368e04 100644 --- a/spec/workers/gitlab_usage_ping_worker_spec.rb +++ b/spec/workers/gitlab_usage_ping_worker_spec.rb @@ -4,19 +4,19 @@ require 'spec_helper' RSpec.describe GitlabUsagePingWorker, :clean_gitlab_redis_shared_state do before do - allow_next_instance_of(SubmitUsagePingService) { |service| allow(service).to receive(:execute) } + allow_next_instance_of(ServicePing::SubmitService) { |service| allow(service).to receive(:execute) } allow(subject).to receive(:sleep) end it 'does not run for GitLab.com' do allow(Gitlab).to receive(:com?).and_return(true) - expect(SubmitUsagePingService).not_to receive(:new) + expect(ServicePing::SubmitService).not_to receive(:new) subject.perform end - it 'delegates to SubmitUsagePingService' do - expect_next_instance_of(SubmitUsagePingService) { |service| expect(service).to receive(:execute) } + it 'delegates to ServicePing::SubmitService' do + expect_next_instance_of(ServicePing::SubmitService) { |service| expect(service).to receive(:execute) } subject.perform end @@ -41,8 +41,8 @@ RSpec.describe GitlabUsagePingWorker, :clean_gitlab_redis_shared_state do Gitlab::ExclusiveLease.new(described_class::LEASE_KEY, timeout: described_class::LEASE_TIMEOUT).try_obtain end - it 'does not invoke SubmitUsagePingService' do - allow_next_instance_of(SubmitUsagePingService) { |service| expect(service).not_to receive(:execute) } + it 'does not invoke ServicePing::SubmitService' do + allow_next_instance_of(ServicePing::SubmitService) { |service| expect(service).not_to receive(:execute) } expect { subject.perform }.to raise_error(Gitlab::ExclusiveLeaseHelpers::FailedToObtainLockError) end |