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/mutations/work_items/linked_items/base_spec.rb')
-rw-r--r--spec/graphql/mutations/work_items/linked_items/base_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/graphql/mutations/work_items/linked_items/base_spec.rb b/spec/graphql/mutations/work_items/linked_items/base_spec.rb
new file mode 100644
index 00000000000..7061c37abd3
--- /dev/null
+++ b/spec/graphql/mutations/work_items/linked_items/base_spec.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Mutations::WorkItems::LinkedItems::Base, feature_category: :groups_and_projects do
+ include GraphqlHelpers
+
+ let_it_be(:user) { create(:user) }
+ let_it_be(:project) { create(:project).tap { |group| group.add_maintainer(user) } }
+ let_it_be(:work_item) { create(:work_item, project: project) }
+
+ it 'raises a NotImplementedError error if the update_links method is called on the base class' do
+ mutation = described_class.new(context: { current_user: user }, object: nil, field: nil)
+
+ expect { mutation.resolve(id: work_item.to_gid) }.to raise_error(NotImplementedError)
+ end
+end