diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-12-05 17:39:15 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-12-05 17:39:15 +0300 |
commit | a6778fc647d83c8fbdca69e1bb2d38b490853ba8 (patch) | |
tree | 93d1d2bc4c5bd85e5255b9cfdf29a88ca9af127f /spec/workers/pipeline_schedule_worker_spec.rb | |
parent | 107ff10eb68aa8715b8bfc5a8ae13bf2f4453355 (diff) |
Rename project's pipelines relation
Diffstat (limited to 'spec/workers/pipeline_schedule_worker_spec.rb')
-rw-r--r-- | spec/workers/pipeline_schedule_worker_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/workers/pipeline_schedule_worker_spec.rb b/spec/workers/pipeline_schedule_worker_spec.rb index bebcbe01009..ff408427926 100644 --- a/spec/workers/pipeline_schedule_worker_spec.rb +++ b/spec/workers/pipeline_schedule_worker_spec.rb @@ -25,12 +25,12 @@ describe PipelineScheduleWorker do context 'when there is a scheduled pipeline within next_run_at' do shared_examples 'successful scheduling' do it 'creates a new pipeline' do - expect { subject }.to change { project.pipelines.count }.by(1) + expect { subject }.to change { project.ci_pipelines.count }.by(1) expect(Ci::Pipeline.last).to be_schedule pipeline_schedule.reload expect(pipeline_schedule.next_run_at).to be > Time.now - expect(pipeline_schedule).to eq(project.pipelines.last.pipeline_schedule) + expect(pipeline_schedule).to eq(project.ci_pipelines.last.pipeline_schedule) expect(pipeline_schedule).to be_active end end @@ -54,7 +54,7 @@ describe PipelineScheduleWorker do end it 'does not creates a new pipeline' do - expect { subject }.not_to change { project.pipelines.count } + expect { subject }.not_to change { project.ci_pipelines.count } end end @@ -64,7 +64,7 @@ describe PipelineScheduleWorker do end it 'creates a failed pipeline with the reason' do - expect { subject }.to change { project.pipelines.count }.by(1) + expect { subject }.to change { project.ci_pipelines.count }.by(1) expect(Ci::Pipeline.last).to be_config_error expect(Ci::Pipeline.last.yaml_errors).not_to be_nil end @@ -105,7 +105,7 @@ describe PipelineScheduleWorker do end it 'does not create a pipeline' do - expect { subject }.not_to change { project.pipelines.count } + expect { subject }.not_to change { project.ci_pipelines.count } end it 'does not raise an exception' do @@ -135,7 +135,7 @@ describe PipelineScheduleWorker do end it 'does not create a pipeline' do - expect { subject }.not_to change { project.pipelines.count } + expect { subject }.not_to change { project.ci_pipelines.count } end it 'does not raise an exception' do |