Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-17 14:59:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-17 14:59:07 +0300
commit8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch)
tree544930fb309b30317ae9797a9683768705d664c4 /spec/finders/ci/pipelines_finder_spec.rb
parent4b1de649d0168371549608993deac953eb692019 (diff)
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/finders/ci/pipelines_finder_spec.rb')
-rw-r--r--spec/finders/ci/pipelines_finder_spec.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/spec/finders/ci/pipelines_finder_spec.rb b/spec/finders/ci/pipelines_finder_spec.rb
index a2a714689ba..16561aa65b6 100644
--- a/spec/finders/ci/pipelines_finder_spec.rb
+++ b/spec/finders/ci/pipelines_finder_spec.rb
@@ -72,7 +72,7 @@ RSpec.describe Ci::PipelinesFinder do
create(:ci_sources_pipeline, pipeline: child_pipeline, source_pipeline: parent_pipeline)
end
- it 'filters out child pipelines and show only the parents' do
+ it 'filters out child pipelines and shows only the parents by default' do
is_expected.to eq([parent_pipeline])
end
end
@@ -195,6 +195,21 @@ RSpec.describe Ci::PipelinesFinder do
end
end
+ context 'when iids filter is specified' do
+ let(:params) { { iids: [pipeline1.iid, pipeline3.iid] } }
+ let!(:pipeline1) { create(:ci_pipeline, project: project) }
+ let!(:pipeline2) { create(:ci_pipeline, project: project) }
+ let!(:pipeline3) { create(:ci_pipeline, project: project, source: :parent_pipeline) }
+
+ it 'returns matches pipelines' do
+ is_expected.to match_array([pipeline1, pipeline3])
+ end
+
+ it 'does not fitler out child pipelines' do
+ is_expected.to include(pipeline3)
+ end
+ end
+
context 'when sha is specified' do
let!(:pipeline) { create(:ci_pipeline, project: project, sha: '97de212e80737a608d939f648d959671fb0a0142') }