4b9b2a43d0
Adding new `AddAwardEmoji`, `RemoveAwardEmoji` and `ToggleAwardEmoji` GraphQL mutations. Adding new `#authorized_find_with_pre_checks!` and (unused, but for completeness `#authorized_find_with_post_checks!`) authorization methods. These allow us to perform an authorized find, and run our own additional checks before or after the authorization runs. https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
21 lines
521 B
Ruby
21 lines
521 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
describe Gitlab::Graphql::CopyFieldDescription do
|
|
subject { Class.new.include(described_class) }
|
|
|
|
describe '.copy_field_description' do
|
|
let(:type) do
|
|
Class.new(Types::BaseObject) do
|
|
graphql_name "TestType"
|
|
|
|
field :field_name, GraphQL::STRING_TYPE, null: true, description: 'Foo'
|
|
end
|
|
end
|
|
|
|
it 'returns the correct description' do
|
|
expect(subject.copy_field_description(type, :field_name)).to eq('Foo')
|
|
end
|
|
end
|
|
end
|