Welcome to mirror list, hosted at ThFree Co, Russian Federation.

data_transfer_resolver_spec.rb « resolvers « graphql « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f5a088dc1c3abc90d1e17e9bb4cb17836a652fda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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