Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/ci/deployable_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/ci/deployable_shared_examples.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/support/shared_examples/ci/deployable_shared_examples.rb b/spec/support/shared_examples/ci/deployable_shared_examples.rb
index 4f43d38e604..0781eec1b4b 100644
--- a/spec/support/shared_examples/ci/deployable_shared_examples.rb
+++ b/spec/support/shared_examples/ci/deployable_shared_examples.rb
@@ -166,6 +166,28 @@ RSpec.shared_examples 'a deployable job' do
expect(deployment).to be_failed
end
+
+ context 'when the job is a stop job' do
+ before do
+ job.update!(environment: 'review', options: { environment: { action: 'stop' } })
+ end
+
+ it 'enqueues Environments::StopJobFailedWorker' do
+ expect(Environments::StopJobFailedWorker)
+ .to receive(:perform_async)
+
+ subject
+ end
+ end
+
+ context 'when the job is not a stop job' do
+ it 'does not enqueue Environments::StopJobFailedWorker' do
+ expect(Environments::StopJobFailedWorker)
+ .not_to receive(:perform_async)
+
+ subject
+ end
+ end
end
context 'when transits to skipped' do