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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-02-15 13:02:05 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-02-15 13:02:05 +0300
commit9c37a26cc744ff4479f2b3b62c15d8b0e62f728d (patch)
tree2fc784d7440ff8760944fb25cfa69ff5c9143847 /spec/services/ci/retry_pipeline_service_spec.rb
parent25b3b2e5bc52000ac05efa9e87bff7bd949d8ed9 (diff)
Close all pipeline todos at once when retrying it
Diffstat (limited to 'spec/services/ci/retry_pipeline_service_spec.rb')
-rw-r--r--spec/services/ci/retry_pipeline_service_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/services/ci/retry_pipeline_service_spec.rb b/spec/services/ci/retry_pipeline_service_spec.rb
index 81019e3db1c..c0af8b8450a 100644
--- a/spec/services/ci/retry_pipeline_service_spec.rb
+++ b/spec/services/ci/retry_pipeline_service_spec.rb
@@ -132,6 +132,19 @@ describe Ci::RetryPipelineService, '#execute', :services do
end
end
end
+
+ it 'closes all todos about failed jobs for pipeline' do
+ expect(MergeRequests::AddTodoWhenBuildFailsService)
+ .to receive_message_chain(:new, :close_all)
+
+ service.execute(pipeline)
+ end
+
+ it 'reprocesses the pipeline' do
+ expect(pipeline).to receive(:process!)
+
+ service.execute(pipeline)
+ end
end
context 'when user is not allowed to retry pipeline' do