summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorRydkin Maxim <maks.rydkin@gmail.com>2017-03-18 12:50:56 +0300
committerRydkin Maxim <maks.rydkin@gmail.com>2017-04-04 21:11:24 +0300
commitc77b1cb0fb8a156faa3f7fa828b6838b7b89d439 (patch)
treedb11b39242256580fa7d3274db0b9b765aeddb65 /spec/services
parentc81ef3041e50411166620a99e6ac80f9dc97d86e (diff)
downloadgitlab-ce-c77b1cb0fb8a156faa3f7fa828b6838b7b89d439.tar.gz
add `does not cancel HEAD pipeline` spec
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/ci/create_pipeline_service_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb
index be677facfe2..3bff0157fda 100644
--- a/spec/services/ci/create_pipeline_service_spec.rb
+++ b/spec/services/ci/create_pipeline_service_spec.rb
@@ -47,7 +47,13 @@ describe Ci::CreatePipelineService, services: true do
project.update(auto_cancel_pending_pipelines: 'enabled')
end
- it_behaves_like 'a pending pipeline'
+ it 'does not cancel HEAD pipeline' do
+ pipeline
+ previous_pipeline = pipeline_on_previous_commit
+
+ expect(pipeline.reload)
+ .to have_attributes(status: 'pending', auto_canceled_by: nil)
+ end
it 'auto cancel pending non-HEAD pipelines' do
pending_pipeline = pipeline_on_previous_commit