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

dashboard_type_spec.rb « metrics « types « graphql « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 114db87d5f156fd2c5b3c190241df7bc4f8d9404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

require 'spec_helper'

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

  it 'has the expected fields' do
    expected_fields = %w[
      path annotations schema_validation_warnings
    ]

    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