diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-18 23:27:06 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-18 23:27:06 +0800 |
commit | 100076ecbbdf3eae361a6356ddfb55b1694e4741 (patch) | |
tree | 36c1eed2c91610f4433da4e2030f1ed778370b05 | |
parent | 9a0201473e24e5036506f0cc8761290da1ca743b (diff) | |
download | gitlab-ce-100076ecbbdf3eae361a6356ddfb55b1694e4741.tar.gz |
Add tests against two jobs having different status
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7508#note_18622469
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index d013dc7b31a..2cc6d1be606 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -421,6 +421,18 @@ describe Ci::Pipeline, models: true do it { is_expected.to be_truthy } end + + %i[success failed canceled].each do |status2| + context "when there are two builds for #{status} and #{status2}" do + before do + build = %i[ci_build generic_commit_status] + create(build.sample, status, pipeline: pipeline) + create(build.sample, status2, pipeline: pipeline) + end + + it { is_expected.to be_truthy } + end + end end %i[success failed canceled].each do |status| |