summaryrefslogtreecommitdiff
path: root/spec/workers
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-10-04 16:35:05 +0900
committerShinya Maeda <shinya@gitlab.com>2018-10-04 16:35:05 +0900
commitf84db3cc917b595752389745eed9da70adee42b2 (patch)
tree7e05baefc2df32f6ef324cae755de6294c89c92f /spec/workers
parent10b09db46ddfdc6dfab55fa9671e716cd46a565b (diff)
downloadgitlab-ce-f84db3cc917b595752389745eed9da70adee42b2.tar.gz
Revert "Avoid conflicts between enumlator's schedule! method and state machine's schedule! method"
This reverts commit 10b09db46ddfdc6dfab55fa9671e716cd46a565b.
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 3ce394789be..a2fe4734d47 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_source_schedule
+ expect(Ci::Pipeline.last).to be_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 afda3d9287b..481a84837f9 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(:source_schedule, ignore_skip_ci: true, save_on_errors: false, schedule: pipeline_schedule)
+ expect(create_pipeline_service).to receive(:execute).with(:schedule, ignore_skip_ci: true, save_on_errors: false, schedule: pipeline_schedule)
worker.perform(pipeline_schedule.id, user.id)
end