diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-21 12:09:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-21 12:09:01 +0300 |
commit | 265a7ceccadf01cf1c2983c54abf86de19f6c2ad (patch) | |
tree | f1de299bda703e91bee465043024ba00832759af /spec/lib/gitlab/pagination | |
parent | 97d7aba1c6be314577492bd609c90279e4afd40d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/pagination')
-rw-r--r-- | spec/lib/gitlab/pagination/gitaly_keyset_pager_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/pagination/gitaly_keyset_pager_spec.rb b/spec/lib/gitlab/pagination/gitaly_keyset_pager_spec.rb index dcb8138bdde..0bafd436bd0 100644 --- a/spec/lib/gitlab/pagination/gitaly_keyset_pager_spec.rb +++ b/spec/lib/gitlab/pagination/gitaly_keyset_pager_spec.rb @@ -126,5 +126,19 @@ RSpec.describe Gitlab::Pagination::GitalyKeysetPager do end end end + + context 'with "none" pagination option' do + let(:expected_result) { double(:result) } + let(:query) { { pagination: 'none' } } + + it 'uses offset pagination' do + expect(finder).to receive(:execute).with(gitaly_pagination: false).and_return(expected_result) + expect(Kaminari).not_to receive(:paginate_array) + expect(Gitlab::Pagination::OffsetPagination).not_to receive(:new) + + actual_result = pager.paginate(finder) + expect(actual_result).to eq(expected_result) + end + end end end |