Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-19 21:42:05 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-19 21:45:49 +0300
commitf71a9de14d118fb14666df9f78365779308312e1 (patch)
tree0afe2ec00dc22fe5eff9c24b25becb16fef9c980 /spec
parentbdf62a19d2cdbdfe554eb73500fd5fe4744161b1 (diff)
Exclude manual actions from cancelable jobs scope
Diffstat (limited to 'spec')
-rw-r--r--spec/models/ci/pipeline_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 157d17fbb68..56b24ce62f3 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -854,6 +854,16 @@ describe Ci::Pipeline, models: true do
end
end
end
+
+ context 'when there is a manual action present in the pipeline' do
+ before do
+ create(:ci_build, :manual, pipeline: pipeline)
+ end
+
+ it 'is not cancelable' do
+ expect(pipeline).not_to be_cancelable
+ end
+ end
end
describe '#cancel_running' do