diff options
Diffstat (limited to 'spec/graphql/resolvers/data_transfer_resolver_spec.rb')
-rw-r--r-- | spec/graphql/resolvers/data_transfer_resolver_spec.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/graphql/resolvers/data_transfer_resolver_spec.rb b/spec/graphql/resolvers/data_transfer_resolver_spec.rb new file mode 100644 index 00000000000..f5a088dc1c3 --- /dev/null +++ b/spec/graphql/resolvers/data_transfer_resolver_spec.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Resolvers::DataTransferResolver, feature_category: :source_code_management do + include GraphqlHelpers + + describe '.source' do + context 'with base DataTransferResolver' do + it 'raises NotImplementedError' do + expect { described_class.source }.to raise_error ::NotImplementedError + end + end + + context 'with projects DataTransferResolver' do + let(:source) { described_class.project.source } + + it 'outputs "Project"' do + expect(source).to eq 'Project' + end + end + + context 'with groups DataTransferResolver' do + let(:source) { described_class.group.source } + + it 'outputs "Group"' do + expect(source).to eq 'Group' + end + end + end +end |