diff options
| author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-02 12:18:53 +0000 |
|---|---|---|
| committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-02 12:18:53 +0000 |
| commit | 51d59a3538b97d85ebb46039044d3f498809b55a (patch) | |
| tree | d574af08cc1e2ef8fa8337a0850fa36a7b9ab527 /spec/support/shared_examples | |
| parent | 74da249f7e22c20e144ba3c044c6bdeb5df86cd4 (diff) | |
| download | gitlab-ce-51d59a3538b97d85ebb46039044d3f498809b55a.tar.gz | |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples')
| -rw-r--r-- | spec/support/shared_examples/workers/self_monitoring_shared_examples.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/spec/support/shared_examples/workers/self_monitoring_shared_examples.rb b/spec/support/shared_examples/workers/self_monitoring_shared_examples.rb deleted file mode 100644 index e6da96e12ec..00000000000 --- a/spec/support/shared_examples/workers/self_monitoring_shared_examples.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# This shared_example requires the following variables: -# let(:service_class) { Gitlab::DatabaseImporters::SelfMonitoring::Project::DeleteService } -# let(:service) { instance_double(service_class) } -RSpec.shared_examples 'executes service' do - before do - allow(service_class).to receive(:new) { service } - end - - it 'runs the service' do - expect(service).to receive(:execute) - - subject.perform - end -end - -RSpec.shared_examples 'returns in_progress based on Sidekiq::Status' do - it 'returns true when job is enqueued' do - jid = described_class.with_status.perform_async - - expect(described_class.in_progress?(jid)).to eq(true) - end - - it 'returns false when job does not exist' do - expect(described_class.in_progress?('fake_jid')).to eq(false) - end -end |
