Commit 100076ec authored by Lin Jen-Shin's avatar Lin Jen-Shin

Add tests against two jobs having different status

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7508#note_18622469
parent 9a020147
...@@ -421,6 +421,18 @@ describe Ci::Pipeline, models: true do ...@@ -421,6 +421,18 @@ describe Ci::Pipeline, models: true do
it { is_expected.to be_truthy } it { is_expected.to be_truthy }
end 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 end
%i[success failed canceled].each do |status| %i[success failed canceled].each do |status|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment