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

base_spec.rb « linked_items « work_items « mutations « graphql « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bc52aee443e4c6b1baf66657a0e3716bf87fdf52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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, "#{described_class} does not implement update_links")
  end
end