diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 19:20:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 19:20:45 +0300 |
commit | d298fad0c0564454271cba11e6f20c19681534ac (patch) | |
tree | 0a19d07d8b3bdd2574617305c300e404f2ace581 /spec/lib/bulk_imports/groups/graphql/get_labels_query_spec.rb | |
parent | c9f9eec79cab801a50db698f682aacffbedf07f7 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc41
Diffstat (limited to 'spec/lib/bulk_imports/groups/graphql/get_labels_query_spec.rb')
-rw-r--r-- | spec/lib/bulk_imports/groups/graphql/get_labels_query_spec.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/lib/bulk_imports/groups/graphql/get_labels_query_spec.rb b/spec/lib/bulk_imports/groups/graphql/get_labels_query_spec.rb new file mode 100644 index 00000000000..2d8f4fb399a --- /dev/null +++ b/spec/lib/bulk_imports/groups/graphql/get_labels_query_spec.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe BulkImports::Groups::Graphql::GetLabelsQuery do + describe '#variables' do + let(:entity) { double(source_full_path: 'test', next_page_for: 'next_page') } + + it 'returns query variables based on entity information' do + expected = { full_path: entity.source_full_path, cursor: entity.next_page_for } + + expect(described_class.variables(entity)).to eq(expected) + end + end + + describe '#data_path' do + it 'returns data path' do + expected = %w[data group labels 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 labels page_info] + + expect(described_class.page_info_path).to eq(expected) + end + end +end |