Add another pipeline for spec status

This commit is contained in:
Shinya Maeda 2017-03-29 01:02:17 +09:00
parent 6f83553ab6
commit 7d48cb015d
1 changed files with 5 additions and 0 deletions

View File

@ -61,6 +61,11 @@ describe PipelinesFinder do
let(:params) { { status: target } }
let!(:pipeline) { create(:ci_pipeline, project: project, status: target) }
before do
exception_status = %w[running pending success failed canceled skipped] - [target]
create(:ci_pipeline, project: project, status: exception_status.sample)
end
it 'returns matched pipelines' do
is_expected.to eq([pipeline])
end