blob: a8babaf8d3b1558b8905b3fbf5787f8fa31a2bd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::Graphql::Pagination::OffsetActiveRecordRelationConnection do
let(:context) { instance_double(GraphQL::Query::Context, schema: GitlabSchema) }
it 'subclasses from GraphQL::Relay::RelationConnection' do
expect(described_class.superclass).to eq GraphQL::Pagination::ActiveRecordRelationConnection
end
it_behaves_like 'a connection with collection methods' do
let(:connection) { described_class.new(Project.all, context: context) }
end
it_behaves_like 'a redactable connection' do
let_it_be(:users) { create_list(:user, 2) }
let(:connection) { described_class.new(User.all, context: context, max_page_size: 10) }
let(:unwanted) { users.second }
end
end
|