debian-mirror-gitlab/spec/graphql/types/metrics/dashboard_type_spec.rb

23 lines
689 B
Ruby
Raw Normal View History

2020-04-22 19:07:51 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe GitlabSchema.types['MetricsDashboard'] do
2020-05-24 23:13:21 +05:30
specify { expect(described_class.graphql_name).to eq('MetricsDashboard') }
2020-04-22 19:07:51 +05:30
it 'has the expected fields' do
expected_fields = %w[
2020-06-23 00:09:42 +05:30
path annotations schema_validation_warnings
2020-04-22 19:07:51 +05:30
]
expect(described_class).to have_graphql_fields(*expected_fields)
end
describe 'annotations field' do
subject { described_class.fields['annotations'] }
it { is_expected.to have_graphql_type(Types::Metrics::Dashboards::AnnotationType.connection_type) }
it { is_expected.to have_graphql_resolver(Resolvers::Metrics::Dashboards::AnnotationResolver) }
end
end