2019-07-07 11:18:12 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe GitlabSchema.types['Milestone'] do
|
2020-05-24 23:13:21 +05:30
|
|
|
specify { expect(described_class.graphql_name).to eq('Milestone') }
|
2019-07-07 11:18:12 +05:30
|
|
|
|
2020-05-24 23:13:21 +05:30
|
|
|
specify { expect(described_class).to require_graphql_authorizations(:read_milestone) }
|
2020-07-28 23:09:34 +05:30
|
|
|
|
|
|
|
it 'has the expected fields' do
|
|
|
|
expected_fields = %w[
|
|
|
|
id title description state web_path
|
|
|
|
due_date start_date created_at updated_at
|
|
|
|
project_milestone group_milestone subgroup_milestone
|
|
|
|
stats
|
|
|
|
]
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
expect(described_class).to have_graphql_fields(*expected_fields).at_least
|
2020-07-28 23:09:34 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
describe 'stats field' do
|
|
|
|
subject { described_class.fields['stats'] }
|
|
|
|
|
|
|
|
it { is_expected.to have_graphql_type(Types::MilestoneStatsType) }
|
|
|
|
end
|
2019-07-07 11:18:12 +05:30
|
|
|
end
|