debian-mirror-gitlab/spec/graphql/resolvers/data_transfer_resolver_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
779 B
Ruby
Raw Normal View History

2023-04-23 21:23:45 +05:30
# 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