summaryrefslogtreecommitdiff
path: root/spec/workers
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-10-04 15:11:36 +0900
committerShinya Maeda <shinya@gitlab.com>2018-10-04 15:11:36 +0900
commit10b09db46ddfdc6dfab55fa9671e716cd46a565b (patch)
tree7726a58c031d7df9d4ab4f16e027f00a9452d18b /spec/workers
parent5381985bd012562696637122b1dcd067480a94d3 (diff)
downloadgitlab-ce-10b09db46ddfdc6dfab55fa9671e716cd46a565b.tar.gz
Avoid conflicts between enumlator's schedule! method and state machine's schedule! method
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/pipeline_schedule_worker_spec.rb2
-rw-r--r--spec/workers/run_pipeline_schedule_worker_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/workers/pipeline_schedule_worker_spec.rb b/spec/workers/pipeline_schedule_worker_spec.rb
index a2fe4734d47..3ce394789be 100644
--- a/spec/workers/pipeline_schedule_worker_spec.rb
+++ b/spec/workers/pipeline_schedule_worker_spec.rb
@@ -25,7 +25,7 @@ describe PipelineScheduleWorker do
shared_examples 'successful scheduling' do
it 'creates a new pipeline' do
expect { subject }.to change { project.pipelines.count }.by(1)
- expect(Ci::Pipeline.last).to be_schedule
+ expect(Ci::Pipeline.last).to be_source_schedule
pipeline_schedule.reload
expect(pipeline_schedule.next_run_at).to be > Time.now
diff --git a/spec/workers/run_pipeline_schedule_worker_spec.rb b/spec/workers/run_pipeline_schedule_worker_spec.rb
index 481a84837f9..afda3d9287b 100644
--- a/spec/workers/run_pipeline_schedule_worker_spec.rb
+++ b/spec/workers/run_pipeline_schedule_worker_spec.rb
@@ -30,7 +30,7 @@ describe RunPipelineScheduleWorker do
it 'calls the Service' do
expect(Ci::CreatePipelineService).to receive(:new).with(project, user, ref: pipeline_schedule.ref).and_return(create_pipeline_service)
- expect(create_pipeline_service).to receive(:execute).with(:schedule, ignore_skip_ci: true, save_on_errors: false, schedule: pipeline_schedule)
+ expect(create_pipeline_service).to receive(:execute).with(:source_schedule, ignore_skip_ci: true, save_on_errors: false, schedule: pipeline_schedule)
worker.perform(pipeline_schedule.id, user.id)
end