debian-mirror-gitlab/spec/graphql/types/alert_management/status_enum_spec.rb

25 lines
597 B
Ruby
Raw Normal View History

2020-05-24 23:13:21 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe GitlabSchema.types['AlertManagementStatus'] do
2020-05-24 23:13:21 +05:30
specify { expect(described_class.graphql_name).to eq('AlertManagementStatus') }
describe 'statuses' do
using RSpec::Parameterized::TableSyntax
where(:status_name, :status_value) do
'TRIGGERED' | 0
'ACKNOWLEDGED' | 1
'RESOLVED' | 2
'IGNORED' | 3
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