summaryrefslogtreecommitdiff
path: root/spec/graphql/types/mutation_type_spec.rb
blob: 1fc46f2d511ef477b6225ea185da266cb2276153 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Types::MutationType do
  it 'is expected to have the MergeRequestSetDraft' do
    expect(described_class).to have_graphql_mutation(Mutations::MergeRequests::SetDraft)
  end

  describe 'deprecated mutations' do
    describe 'clusterAgentTokenDelete' do
      let(:field) { get_field('clusterAgentTokenDelete') }

      it { expect(field.deprecation_reason).to eq('Tokens must be revoked with ClusterAgentTokenRevoke. Deprecated in 14.7.') }
    end
  end

  def get_field(name)
    described_class.fields[GraphqlHelpers.fieldnamerize(name)]
  end
end