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

work_item_types_spec.rb « project « graphql « api « requests « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 086db983760a07342635517d67b300c4652d13ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'getting a list of work item types for a project', feature_category: :team_planning do
  include GraphqlHelpers

  let_it_be(:project) { create(:project) }
  let_it_be(:developer) { create(:user).tap { |u| project.add_developer(u) } }

  it_behaves_like 'graphql work item type list request spec' do
    let(:current_user) { developer }
    let(:parent_key) { :project }

    let(:query) do
      graphql_query_for(
        'project',
        { 'fullPath' => project.full_path },
        query_nodes('WorkItemTypes', work_item_type_fields)
      )
    end
  end
end