debian-mirror-gitlab/spec/graphql/types/mutation_type_spec.rb

22 lines
604 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Types::MutationType do
2021-06-08 01:23:25 +05:30
it 'is expected to have the deprecated MergeRequestSetWip' do
field = get_field('MergeRequestSetWip')
expect(field).to be_present
expect(field.deprecation_reason).to be_present
expect(field.resolver).to eq(Mutations::MergeRequests::SetWip)
end
it 'is expected to have the MergeRequestSetDraft' do
expect(described_class).to have_graphql_mutation(Mutations::MergeRequests::SetDraft)
2018-11-18 11:00:15 +05:30
end
2020-07-28 23:09:34 +05:30
2021-06-08 01:23:25 +05:30
def get_field(name)
described_class.fields[GraphqlHelpers.fieldnamerize(name)]
2020-07-28 23:09:34 +05:30
end
2018-11-18 11:00:15 +05:30
end