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

25 lines
633 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
2021-01-03 14:25:43 +05:30
'TRIGGERED' | :triggered
'ACKNOWLEDGED' | :acknowledged
'RESOLVED' | :resolved
'IGNORED' | :ignored
2020-05-24 23:13:21 +05:30
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