2020-05-26 18:08:20 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 09:08:32 +00:00
|
|
|
RSpec.describe GitlabSchema.types['ReleaseAssets'] do
|
2020-05-26 18:08:20 +00:00
|
|
|
it { expect(described_class).to require_graphql_authorizations(:read_release) }
|
|
|
|
|
|
|
|
it 'has the expected fields' do
|
|
|
|
expected_fields = %w[
|
2020-06-18 06:08:33 +00:00
|
|
|
count links sources
|
2020-05-26 18:08:20 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
expect(described_class).to include_graphql_fields(*expected_fields)
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'links field' do
|
|
|
|
subject { described_class.fields['links'] }
|
|
|
|
|
2020-06-18 15:08:45 +00:00
|
|
|
it { is_expected.to have_graphql_type(Types::ReleaseAssetLinkType.connection_type) }
|
2020-05-26 18:08:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
describe 'sources field' do
|
|
|
|
subject { described_class.fields['sources'] }
|
|
|
|
|
|
|
|
it { is_expected.to have_graphql_type(Types::ReleaseSourceType.connection_type) }
|
|
|
|
end
|
|
|
|
end
|