debian-mirror-gitlab/spec/lib/gitlab/graphql/copy_field_description_spec.rb

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

22 lines
529 B
Ruby
Raw Normal View History

2019-09-30 21:07:59 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::Graphql::CopyFieldDescription do
2019-09-30 21:07:59 +05:30
subject { Class.new.include(described_class) }
describe '.copy_field_description' do
let(:type) do
Class.new(Types::BaseObject) do
graphql_name "TestType"
2021-10-27 15:23:28 +05:30
field :field_name, GraphQL::Types::String, null: true, description: 'Foo'
2019-09-30 21:07:59 +05:30
end
end
it 'returns the correct description' do
expect(subject.copy_field_description(type, :field_name)).to eq('Foo')
end
end
end