debian-mirror-gitlab/spec/graphql/types/release_type_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.4 KiB
Ruby
Raw Normal View History

2020-05-24 23:13:21 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe GitlabSchema.types['Release'] do
2020-05-24 23:13:21 +05:30
it { expect(described_class).to require_graphql_authorizations(:read_release) }
it 'has the expected fields' do
expected_fields = %w[
tag_name tag_path
description description_html
2020-07-28 23:09:34 +05:30
name milestones evidences author commit
assets links
2022-08-13 15:12:31 +05:30
created_at released_at upcoming_release
historical_release
2020-05-24 23:13:21 +05:30
]
expect(described_class).to include_graphql_fields(*expected_fields)
end
2020-06-23 00:09:42 +05:30
describe 'assets field' do
subject { described_class.fields['assets'] }
it { is_expected.to have_graphql_type(Types::ReleaseAssetsType) }
end
2020-07-28 23:09:34 +05:30
describe 'links field' do
subject { described_class.fields['links'] }
it { is_expected.to have_graphql_type(Types::ReleaseLinksType) }
end
2020-05-24 23:13:21 +05:30
describe 'milestones field' do
subject { described_class.fields['milestones'] }
it { is_expected.to have_graphql_type(Types::MilestoneType.connection_type) }
end
2020-06-23 00:09:42 +05:30
describe 'evidences field' do
subject { described_class.fields['evidences'] }
it { is_expected.to have_graphql_type(Types::EvidenceType.connection_type) }
end
2020-05-24 23:13:21 +05:30
describe 'author field' do
subject { described_class.fields['author'] }
it { is_expected.to have_graphql_type(Types::UserType) }
end
describe 'commit field' do
subject { described_class.fields['commit'] }
it { is_expected.to have_graphql_type(Types::CommitType) }
end
end