blob: a4a458d35682b978d04834d1bd9cb320182d4517 (
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
|
# 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 '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
|