diff options
author | James Fargher <proglottis@gmail.com> | 2019-08-20 12:38:23 +1200 |
---|---|---|
committer | James Fargher <proglottis@gmail.com> | 2019-08-20 14:31:14 +1200 |
commit | 42da4faca442b4fcc0af2f66b1f2ad13d9d13b66 (patch) | |
tree | cb4fa87fec992c41e92c8fe153e046240a99671f /spec/models/ci/pipeline_spec.rb | |
parent | 30004bc9b77ec02cfbf30e951c8adc7978081762 (diff) | |
download | gitlab-ce-auto_devops_detect.tar.gz |
Auto-DevOps pipeline skipped bannerauto_devops_detect
Small banner to show the user why their pipeline was skipped
Diffstat (limited to 'spec/models/ci/pipeline_spec.rb')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 76ff31221fe..a141e56c0c7 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -3082,4 +3082,38 @@ describe Ci::Pipeline, :mailer do end end end + + describe '#auto_devops_unsupported?' do + subject { pipeline } + + context 'buildable' do + before do + pipeline.auto_devops_buildable = true + end + + it 'is supported' do + is_expected.not_to be_auto_devops_unsupported + end + end + + context 'not buildable' do + before do + pipeline.auto_devops_buildable = false + end + + it 'is unsupported' do + is_expected.to be_auto_devops_unsupported + end + end + + context 'unknown buildable' do + before do + pipeline.auto_devops_buildable = nil + end + + it 'is supported' do + is_expected.not_to be_auto_devops_unsupported + end + end + end end |