summaryrefslogtreecommitdiff
path: root/spec/lib/bulk_imports/groups/graphql/get_members_query_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/bulk_imports/groups/graphql/get_members_query_spec.rb')
-rw-r--r--spec/lib/bulk_imports/groups/graphql/get_members_query_spec.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/lib/bulk_imports/groups/graphql/get_members_query_spec.rb b/spec/lib/bulk_imports/groups/graphql/get_members_query_spec.rb
new file mode 100644
index 00000000000..5d05f5a2d30
--- /dev/null
+++ b/spec/lib/bulk_imports/groups/graphql/get_members_query_spec.rb
@@ -0,0 +1,35 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe BulkImports::Groups::Graphql::GetMembersQuery do
+ it 'has a valid query' do
+ entity = create(:bulk_import_entity)
+ context = BulkImports::Pipeline::Context.new(entity)
+
+ query = GraphQL::Query.new(
+ GitlabSchema,
+ described_class.to_s,
+ variables: described_class.variables(context)
+ )
+ result = GitlabSchema.static_validator.validate(query)
+
+ expect(result[:errors]).to be_empty
+ end
+
+ describe '#data_path' do
+ it 'returns data path' do
+ expected = %w[data group group_members nodes]
+
+ expect(described_class.data_path).to eq(expected)
+ end
+ end
+
+ describe '#page_info_path' do
+ it 'returns pagination information path' do
+ expected = %w[data group group_members page_info]
+
+ expect(described_class.page_info_path).to eq(expected)
+ end
+ end
+end