diff options
Diffstat (limited to 'spec/workers/gitlab_usage_ping_worker_spec.rb')
-rw-r--r-- | spec/workers/gitlab_usage_ping_worker_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/workers/gitlab_usage_ping_worker_spec.rb b/spec/workers/gitlab_usage_ping_worker_spec.rb index a180d29fd5f..f282b20363c 100644 --- a/spec/workers/gitlab_usage_ping_worker_spec.rb +++ b/spec/workers/gitlab_usage_ping_worker_spec.rb @@ -8,6 +8,13 @@ RSpec.describe GitlabUsagePingWorker, :clean_gitlab_redis_shared_state do 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) + + subject.perform + end + it 'delegates to SubmitUsagePingService' do expect_next_instance_of(SubmitUsagePingService) { |service| expect(service).to receive(:execute) } |