diff options
Diffstat (limited to 'spec/workers/gitlab_service_ping_worker_spec.rb')
-rw-r--r-- | spec/workers/gitlab_service_ping_worker_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/workers/gitlab_service_ping_worker_spec.rb b/spec/workers/gitlab_service_ping_worker_spec.rb index f17847a7b33..1d16e8c3496 100644 --- a/spec/workers/gitlab_service_ping_worker_spec.rb +++ b/spec/workers/gitlab_service_ping_worker_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe GitlabServicePingWorker, :clean_gitlab_redis_shared_state do +RSpec.describe GitlabServicePingWorker, :clean_gitlab_redis_shared_state, feature_category: :service_ping do let(:payload) { { recorded_at: Time.current.rfc3339 } } before do @@ -14,15 +14,13 @@ RSpec.describe GitlabServicePingWorker, :clean_gitlab_redis_shared_state do allow(subject).to receive(:sleep) end - it 'does not run for GitLab.com when triggered from cron' do - allow(Gitlab).to receive(:com?).and_return(true) + it 'does not run for SaaS when triggered from cron', :saas do expect(ServicePing::SubmitService).not_to receive(:new) subject.perform end - it 'runs for GitLab.com when triggered manually' do - allow(Gitlab).to receive(:com?).and_return(true) + it 'runs for SaaS when triggered manually', :saas do expect(ServicePing::SubmitService).to receive(:new) subject.perform('triggered_from_cron' => false) |