From b04b1e12c5847f7d366e08af47115d985b73e185 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 15 May 2020 15:49:40 +0000 Subject: Add latest changes from gitlab-org/gitlab@12-10-stable-ee --- .../externally_paginated_array_connection_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'spec/lib') diff --git a/spec/lib/gitlab/graphql/pagination/externally_paginated_array_connection_spec.rb b/spec/lib/gitlab/graphql/pagination/externally_paginated_array_connection_spec.rb index 85a5b1dacc7..11cf14523c2 100644 --- a/spec/lib/gitlab/graphql/pagination/externally_paginated_array_connection_spec.rb +++ b/spec/lib/gitlab/graphql/pagination/externally_paginated_array_connection_spec.rb @@ -19,6 +19,20 @@ describe Gitlab::Graphql::Pagination::ExternallyPaginatedArrayConnection do it_behaves_like 'connection with paged nodes' do let(:paged_nodes_size) { values.size } end + + context 'when after or before is specified, they are ignored' do + # after and before are not used to filter the array, as they + # were already used to directly fetch the external array + it_behaves_like 'connection with paged nodes' do + let(:arguments) { { after: next_cursor } } + let(:paged_nodes_size) { values.size } + end + + it_behaves_like 'connection with paged nodes' do + let(:arguments) { { before: prev_cursor } } + let(:paged_nodes_size) { values.size } + end + end end describe '#start_cursor' do -- cgit v1.2.3