2020-04-28 15:09:29 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe GitlabSchema.types['AlertManagementAlert'] do
|
2020-05-07 06:09:38 +00:00
|
|
|
specify { expect(described_class.graphql_name).to eq('AlertManagementAlert') }
|
2020-04-28 15:09:29 +00:00
|
|
|
|
2020-05-07 21:09:26 +00:00
|
|
|
specify { expect(described_class).to require_graphql_authorizations(:read_alert_management_alert) }
|
2020-04-28 15:09:29 +00:00
|
|
|
|
|
|
|
it 'exposes the expected fields' do
|
|
|
|
expected_fields = %i[
|
|
|
|
iid
|
2020-05-11 18:09:55 +00:00
|
|
|
issue_iid
|
2020-04-28 15:09:29 +00:00
|
|
|
title
|
2020-05-06 12:09:36 +00:00
|
|
|
description
|
2020-04-28 15:09:29 +00:00
|
|
|
severity
|
|
|
|
status
|
|
|
|
service
|
|
|
|
monitoring_tool
|
2020-05-06 12:09:36 +00:00
|
|
|
hosts
|
2020-04-28 15:09:29 +00:00
|
|
|
started_at
|
|
|
|
ended_at
|
|
|
|
event_count
|
2020-05-06 12:09:36 +00:00
|
|
|
details
|
|
|
|
created_at
|
|
|
|
updated_at
|
2020-05-29 21:08:35 +00:00
|
|
|
assignees
|
2020-04-28 15:09:29 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
expect(described_class).to have_graphql_fields(*expected_fields)
|
|
|
|
end
|
|
|
|
end
|