blob: 58b53af80fb26c0a60593a8c9c1cdbd3005138db (
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['ContainerRegistryProtectionRule'], feature_category: :container_registry do
specify { expect(described_class.graphql_name).to eq('ContainerRegistryProtectionRule') }
specify { expect(described_class.description).to be_present }
specify { expect(described_class).to require_graphql_authorizations(:admin_container_image) }
describe 'id' do
subject { described_class.fields['id'] }
it { is_expected.to have_non_null_graphql_type(::Types::GlobalIDType[::ContainerRegistry::Protection::Rule]) }
end
describe 'container_path_pattern' do
subject { described_class.fields['containerPathPattern'] }
it { is_expected.to have_non_null_graphql_type(GraphQL::Types::String) }
end
describe 'push_protected_up_to_access_level' do
subject { described_class.fields['pushProtectedUpToAccessLevel'] }
it { is_expected.to have_non_null_graphql_type(Types::ContainerRegistry::Protection::RuleAccessLevelEnum) }
end
describe 'delete_protected_up_to_access_level' do
subject { described_class.fields['deleteProtectedUpToAccessLevel'] }
it { is_expected.to have_non_null_graphql_type(Types::ContainerRegistry::Protection::RuleAccessLevelEnum) }
end
end
|