diff options
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.rb | 17 |
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 |