diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-05-19 21:42:05 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-05-19 21:45:49 +0300 |
commit | f71a9de14d118fb14666df9f78365779308312e1 (patch) | |
tree | 0afe2ec00dc22fe5eff9c24b25becb16fef9c980 /spec | |
parent | bdf62a19d2cdbdfe554eb73500fd5fe4744161b1 (diff) |
Exclude manual actions from cancelable jobs scope
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 10 |
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 |