2020-03-13 15:44:24 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe GitlabSchema.types['Environment'] do
|
|
|
|
it { expect(described_class.graphql_name).to eq('Environment') }
|
|
|
|
|
|
|
|
it 'has the expected fields' do
|
|
|
|
expected_fields = %w[
|
2020-04-22 19:07:51 +05:30
|
|
|
name id state metrics_dashboard
|
2020-03-13 15:44:24 +05:30
|
|
|
]
|
|
|
|
|
2020-04-22 19:07:51 +05:30
|
|
|
expect(described_class).to have_graphql_fields(*expected_fields)
|
2020-03-13 15:44:24 +05:30
|
|
|
end
|
|
|
|
|
2020-04-22 19:07:51 +05:30
|
|
|
it { expect(described_class).to require_graphql_authorizations(:read_environment) }
|
2020-03-13 15:44:24 +05:30
|
|
|
end
|