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>2022-07-21 12:09:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-21 12:09:01 +0300
commit265a7ceccadf01cf1c2983c54abf86de19f6c2ad (patch)
treef1de299bda703e91bee465043024ba00832759af /spec/lib/gitlab/pagination
parent97d7aba1c6be314577492bd609c90279e4afd40d (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.rb14
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