summaryrefslogtreecommitdiff
path: root/spec/finders/pipelines_finder_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/finders/pipelines_finder_spec.rb')
-rw-r--r--spec/finders/pipelines_finder_spec.rb5
1 files changed, 5 insertions, 0 deletions
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