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

status_enum_spec.rb « alert_management « types « graphql « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1252efabe4cd453fc06c90df19e1ae877e29411c (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
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe GitlabSchema.types['AlertManagementStatus'] do
  specify { expect(described_class.graphql_name).to eq('AlertManagementStatus') }

  describe 'statuses' do
    using RSpec::Parameterized::TableSyntax

    where(:status_name, :status_value) do
      'TRIGGERED'    | :triggered
      'ACKNOWLEDGED' | :acknowledged
      'RESOLVED'     | :resolved
      'IGNORED'      | :ignored
    end

    with_them do
      it 'exposes a status with the correct value' do
        expect(described_class.values[status_name].value).to eq(status_value)
      end
    end
  end
end