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

available_export_fields_enum_spec.rb « work_items « types « graphql « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9010aabe3cc97e65c9eacad3f2b20e8d4e029b67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe GitlabSchema.types['AvailableExportFields'], feature_category: :team_planning do
  specify { expect(described_class.graphql_name).to eq('AvailableExportFields') }

  describe 'enum values' do
    using RSpec::Parameterized::TableSyntax

    where(:field_name, :field_value) do
      'ID'              | 'id'
      'TYPE'            | 'type'
      'TITLE'           | 'title'
      'DESCRIPTION'     | 'description'
      'AUTHOR'          | 'author'
      'AUTHOR_USERNAME' | 'author username'
      'CREATED_AT'      | 'created_at'
    end

    with_them do
      it 'exposes correct available fields' do
        expect(described_class.values[field_name].value).to eq(field_value)
      end
    end
  end
end