summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-15 15:49:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-15 15:49:40 +0000
commitb04b1e12c5847f7d366e08af47115d985b73e185 (patch)
tree5077e33eedbf1e99b9ef9b87395f9acce844b234 /spec/lib/gitlab
parenta5b9fb9abc2b83304f45392642801b28f52b3f48 (diff)
downloadgitlab-ce-b04b1e12c5847f7d366e08af47115d985b73e185.tar.gz
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/graphql/pagination/externally_paginated_array_connection_spec.rb14
1 files changed, 14 insertions, 0 deletions
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