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/workers/pipeline_schedule_worker_spec.rb')
-rw-r--r--spec/workers/pipeline_schedule_worker_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/workers/pipeline_schedule_worker_spec.rb b/spec/workers/pipeline_schedule_worker_spec.rb
index da6a0254a17..48138034c33 100644
--- a/spec/workers/pipeline_schedule_worker_spec.rb
+++ b/spec/workers/pipeline_schedule_worker_spec.rb
@@ -77,8 +77,18 @@ RSpec.describe PipelineScheduleWorker, :sidekiq_inline, feature_category: :conti
stub_ci_pipeline_yaml_file(YAML.dump(rspec: { variables: 'rspec' } ))
end
- it 'does not creates a new pipeline' do
- expect { subject }.not_to change { project.ci_pipelines.count }
+ it 'creates a new pipeline' do
+ expect { subject }.to change { project.ci_pipelines.count }.by(1)
+ end
+
+ context 'with feature flag persist_failed_pipelines_from_schedules disabled' do
+ before do
+ stub_feature_flags(persist_failed_pipelines_from_schedules: false)
+ end
+
+ it 'does not create a new pipeline' do
+ expect { subject }.not_to change { project.ci_pipelines.count }
+ end
end
end
end