summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-05-20 11:41:50 -0700
committerStan Hu <stanhu@gmail.com>2019-05-20 12:19:15 -0700
commitc1827f1c502d6235790c7a3841587842c8ad8bc7 (patch)
treeaea17339c7cf682490cb80001a4e773410b6d814 /spec
parentcddf9b875a25814e20f3209f04c00c95847f38c2 (diff)
downloadgitlab-ce-c1827f1c502d6235790c7a3841587842c8ad8bc7.tar.gz
API: Fix recursive flag not working with Rugged get_tree_entries flag
Attempting to use the API endpoint /projects/:id/repository/tree?recursive=true would only return a subset of the results since the full recursive list wasn't actually being returned. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/61979
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/git/tree_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/lib/gitlab/git/tree_spec.rb b/spec/lib/gitlab/git/tree_spec.rb
index 7ad3cde97f8..7e169cfe270 100644
--- a/spec/lib/gitlab/git/tree_spec.rb
+++ b/spec/lib/gitlab/git/tree_spec.rb
@@ -19,7 +19,9 @@ describe Gitlab::Git::Tree, :seed_helper do
it 'returns a list of tree objects' do
entries = described_class.where(repository, SeedRepo::Commit::ID, 'files', true)
- expect(entries.count).to be >= 5
+ expect(entries.map(&:path)).to include('files/html',
+ 'files/markdown/ruby-style-guide.md')
+ expect(entries.count).to be >= 10
expect(entries).to all(be_a(Gitlab::Git::Tree))
end