diff options
author | Rydkin Maxim <maks.rydkin@gmail.com> | 2017-03-18 14:46:56 +0300 |
---|---|---|
committer | Rydkin Maxim <maks.rydkin@gmail.com> | 2017-04-04 21:11:24 +0300 |
commit | a4d08e6babbbdbd44267aebdcccd2cc2c63e48ed (patch) | |
tree | 689d13927396e8af3eee7abd2fd663ee2688a410 /spec/services/ci | |
parent | 40f67c1da84379e293db14b61dc7390bc4d0a4c4 (diff) |
rename `auto_canceled_by` and add foreign key
Diffstat (limited to 'spec/services/ci')
-rw-r--r-- | spec/services/ci/create_pipeline_service_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index a61c17c66f1..4c23a371484 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -52,14 +52,14 @@ describe Ci::CreatePipelineService, services: true do previous_pipeline = pipeline_on_previous_commit expect(pipeline.reload) - .to have_attributes(status: 'pending', auto_canceled_by: nil) + .to have_attributes(status: 'pending', auto_canceled_by_id: nil) end it 'auto cancel pending non-HEAD pipelines' do pending_pipeline = pipeline_on_previous_commit pipeline - expect(pending_pipeline.reload).to have_attributes(status: 'canceled', auto_canceled_by: pipeline.id) + expect(pending_pipeline.reload).to have_attributes(status: 'canceled', auto_canceled_by_id: pipeline.id) end it 'does not cancel running outdated pipelines' do @@ -67,7 +67,7 @@ describe Ci::CreatePipelineService, services: true do running_pipeline.run execute_service - expect(running_pipeline.reload).to have_attributes(status: 'running', auto_canceled_by: nil) + expect(running_pipeline.reload).to have_attributes(status: 'running', auto_canceled_by_id: nil) end it 'cancel created outdated pipelines' do @@ -75,7 +75,7 @@ describe Ci::CreatePipelineService, services: true do created_pipeline.update(status: 'created') pipeline - expect(created_pipeline.reload).to have_attributes(status: 'canceled', auto_canceled_by: pipeline.id) + expect(created_pipeline.reload).to have_attributes(status: 'canceled', auto_canceled_by_id: pipeline.id) end it 'does not cancel pipelines from the other branches' do @@ -85,7 +85,7 @@ describe Ci::CreatePipelineService, services: true do ) pipeline - expect(pending_pipeline.reload).to have_attributes(status: 'pending', auto_canceled_by: nil) + expect(pending_pipeline.reload).to have_attributes(status: 'pending', auto_canceled_by_id: nil) end end end |