Add tests against two jobs having different status

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7508#note_18622469
This commit is contained in:
Lin Jen-Shin 2016-11-18 23:27:06 +08:00
parent 9a0201473e
commit 100076ecbb

View file

@ -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|