diff options
author | Stan Hu <stanhu@gmail.com> | 2019-05-20 21:41:50 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-20 22:19:15 +0300 |
commit | c1827f1c502d6235790c7a3841587842c8ad8bc7 (patch) | |
tree | aea17339c7cf682490cb80001a4e773410b6d814 /spec/lib/gitlab/git/tree_spec.rb | |
parent | cddf9b875a25814e20f3209f04c00c95847f38c2 (diff) |
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/lib/gitlab/git/tree_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git/tree_spec.rb | 4 |
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 |