blob: 40048b7dfa67542b686ef37540bff30f2e99aa24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe GitlabSchema.types['PackageSettings'], feature_category: :package_registry do
specify { expect(described_class.graphql_name).to eq('PackageSettings') }
specify { expect(described_class.description).to eq('Namespace-level Package Registry settings') }
specify { expect(described_class).to require_graphql_authorizations(:admin_package) }
describe 'maven_duplicate_exception_regex field' do
subject { described_class.fields['mavenDuplicateExceptionRegex'] }
it { is_expected.to have_graphql_type(Types::UntrustedRegexp) }
end
it 'includes package setting fields' do
expected_fields = %w[
maven_duplicates_allowed
maven_duplicate_exception_regex
generic_duplicates_allowed
generic_duplicate_exception_regex
maven_package_requests_forwarding
lock_maven_package_requests_forwarding
npm_package_requests_forwarding
lock_npm_package_requests_forwarding
pypi_package_requests_forwarding
lock_pypi_package_requests_forwarding
maven_package_requests_forwarding_locked
npm_package_requests_forwarding_locked
pypi_package_requests_forwarding_locked
]
expect(described_class).to include_graphql_fields(*expected_fields)
end
end
|