diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-05-30 13:27:46 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-05-30 13:27:46 +0200 |
commit | 6113ff992c9a494ea8c657f20fa92f7f7f2365c4 (patch) | |
tree | d839633f5edaff9975b38a0429f442361ab6abfe /spec/models | |
parent | 96cd42287990a67b0ba709b2bb79cb3722230ec4 (diff) | |
download | gitlab-ce-6113ff992c9a494ea8c657f20fa92f7f7f2365c4.tar.gz |
Expose stage model attributes from pipeline object
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 56b24ce62f3..c4f07c4a693 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -502,6 +502,20 @@ describe Ci::Pipeline, models: true do end end + describe '#has_stages?' do + context 'when pipeline has stages' do + subject { create(:ci_pipeline_with_one_job) } + + it { is_expected.to have_stages } + end + + context 'when pipeline does not have stages' do + subject { create(:ci_pipeline_without_jobs) } + + it { is_expected.not_to have_stages } + end + end + describe '#has_warnings?' do subject { pipeline.has_warnings? } |