blob: bc5a052796d4374936740c73f6ce8999ea2a9b87 (
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
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe GitlabSchema.types['PackagesProtectionRule'], feature_category: :package_registry do
specify { expect(described_class.graphql_name).to eq('PackagesProtectionRule') }
specify { expect(described_class.description).to be_present }
specify { expect(described_class).to require_graphql_authorizations(:admin_package) }
describe 'id' do
subject { described_class.fields['id'] }
it { is_expected.to have_non_null_graphql_type(::Types::GlobalIDType[::Packages::Protection::Rule]) }
end
describe 'package_name_pattern' do
subject { described_class.fields['packageNamePattern'] }
it { is_expected.to have_non_null_graphql_type(GraphQL::Types::String) }
end
describe 'package_type' do
subject { described_class.fields['packageType'] }
it { is_expected.to have_non_null_graphql_type(Types::Packages::Protection::RulePackageTypeEnum) }
end
describe 'push_protected_up_to_access_level' do
subject { described_class.fields['pushProtectedUpToAccessLevel'] }
it { is_expected.to have_non_null_graphql_type(Types::Packages::Protection::RuleAccessLevelEnum) }
end
end
|