From 7d48cb015d5590cee85fcce863e1a6bb698ab1e4 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Wed, 29 Mar 2017 01:02:17 +0900 Subject: [PATCH] Add another pipeline for spec status --- spec/finders/pipelines_finder_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/finders/pipelines_finder_spec.rb b/spec/finders/pipelines_finder_spec.rb index 948a33d379f..772c18b22d3 100644 --- a/spec/finders/pipelines_finder_spec.rb +++ b/spec/finders/pipelines_finder_spec.rb @@ -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