Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/graphql/types/mutation_type_spec.rb')
-rw-r--r--spec/graphql/types/mutation_type_spec.rb18
1 files changed, 13 insertions, 5 deletions
diff --git a/spec/graphql/types/mutation_type_spec.rb b/spec/graphql/types/mutation_type_spec.rb
index 41993327577..e4144e4fa97 100644
--- a/spec/graphql/types/mutation_type_spec.rb
+++ b/spec/graphql/types/mutation_type_spec.rb
@@ -3,8 +3,16 @@
require 'spec_helper'
RSpec.describe Types::MutationType do
- it 'is expected to have the MergeRequestSetWip' do
- expect(described_class).to have_graphql_mutation(Mutations::MergeRequests::SetWip)
+ 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)
end
describe 'deprecated and aliased mutations' do
@@ -27,9 +35,9 @@ RSpec.describe Types::MutationType do
it { expect(alias_field.resolver.fields).to eq(canonical_field.resolver.fields) }
it { expect(alias_field.resolver.arguments).to eq(canonical_field.resolver.arguments) }
end
+ end
- def get_field(name)
- described_class.fields[GraphqlHelpers.fieldnamerize(name)]
- end
+ def get_field(name)
+ described_class.fields[GraphqlHelpers.fieldnamerize(name)]
end
end