summaryrefslogtreecommitdiff
path: root/spec/finders
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2019-07-01 08:38:16 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2019-07-01 08:38:16 +0000
commit8775e4a1faf13a01451e71ea9ef729dc52e6d3c1 (patch)
tree8632c5465f6b3dee57bb0ccd64f5162c35b8ab15 /spec/finders
parentf63dc06cb4572db92bb91c936e9862c55f1f365e (diff)
parentca5cd7b7fb5108d30d0f6b74e31da736024592dd (diff)
downloadgitlab-ce-8775e4a1faf13a01451e71ea9ef729dc52e6d3c1.tar.gz
Merge branch 'id-stale-branches' into 'master'
Add endpoint for fetching diverging commit counts See merge request gitlab-org/gitlab-ce!29802
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/branches_finder_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/finders/branches_finder_spec.rb b/spec/finders/branches_finder_spec.rb
index 7d164539d9a..3fc86f3e408 100644
--- a/spec/finders/branches_finder_spec.rb
+++ b/spec/finders/branches_finder_spec.rb
@@ -62,6 +62,15 @@ describe BranchesFinder do
expect(result.count).to eq(0)
end
+
+ it 'filters branches by provided names' do
+ branches_finder = described_class.new(repository, { names: ['fix', 'csv', 'lfs', 'does-not-exist'] })
+
+ result = branches_finder.execute
+
+ expect(result.count).to eq(3)
+ expect(result.map(&:name)).to eq(%w{csv fix lfs})
+ end
end
context 'filter and sort' do