diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-17 18:15:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-17 18:15:43 +0300 |
commit | 843b1e9386fbda332839d23246d0ee2382fb7f4c (patch) | |
tree | 7663f7e38aa4e018c7210a9abdfddcd83a8bcbce /spec/graphql | |
parent | 2724004cd7b8fa9d179c926c62f2fd7be63c2d81 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql')
6 files changed, 31 insertions, 6 deletions
diff --git a/spec/graphql/types/ci/catalog/resource_type_spec.rb b/spec/graphql/types/ci/catalog/resource_type_spec.rb index 5f5732c5237..c1230fa6df7 100644 --- a/spec/graphql/types/ci/catalog/resource_type_spec.rb +++ b/spec/graphql/types/ci/catalog/resource_type_spec.rb @@ -16,7 +16,6 @@ RSpec.describe Types::Ci::Catalog::ResourceType, feature_category: :pipeline_com latest_version latest_released_at star_count - forks_count root_namespace readme_html open_issues_count diff --git a/spec/graphql/types/container_repository_details_type_spec.rb b/spec/graphql/types/container_repository_details_type_spec.rb index 62e72089e09..2253b07f5c8 100644 --- a/spec/graphql/types/container_repository_details_type_spec.rb +++ b/spec/graphql/types/container_repository_details_type_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe GitlabSchema.types['ContainerRepositoryDetails'] do fields = %i[id name path location created_at updated_at expiration_policy_started_at status tags_count can_delete expiration_policy_cleanup_status tags size - project migration_state last_cleanup_deleted_tags_count] + project migration_state last_cleanup_deleted_tags_count userPermissions] it { expect(described_class.graphql_name).to eq('ContainerRepositoryDetails') } diff --git a/spec/graphql/types/container_repository_tag_type_spec.rb b/spec/graphql/types/container_repository_tag_type_spec.rb index 1d1a76d6916..596a221b5c0 100644 --- a/spec/graphql/types/container_repository_tag_type_spec.rb +++ b/spec/graphql/types/container_repository_tag_type_spec.rb @@ -2,8 +2,8 @@ require 'spec_helper' -RSpec.describe GitlabSchema.types['ContainerRepositoryTag'] do - fields = %i[name path location digest revision short_revision total_size created_at can_delete] +RSpec.describe GitlabSchema.types['ContainerRepositoryTag'], feature_category: :container_registry do + fields = %i[name path location digest revision short_revision total_size created_at can_delete user_permissions] it { expect(described_class.graphql_name).to eq('ContainerRepositoryTag') } @@ -12,4 +12,6 @@ RSpec.describe GitlabSchema.types['ContainerRepositoryTag'] do it { expect(described_class).to require_graphql_authorizations(:read_container_image) } it { expect(described_class).to have_graphql_fields(fields) } + + it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::ContainerRepositoryTag) } end diff --git a/spec/graphql/types/container_repository_type_spec.rb b/spec/graphql/types/container_repository_type_spec.rb index bc92fa24050..0c7879c3f2a 100644 --- a/spec/graphql/types/container_repository_type_spec.rb +++ b/spec/graphql/types/container_repository_type_spec.rb @@ -2,10 +2,10 @@ require 'spec_helper' -RSpec.describe GitlabSchema.types['ContainerRepository'] do +RSpec.describe GitlabSchema.types['ContainerRepository'], feature_category: :container_registry do fields = %i[id name path location created_at updated_at expiration_policy_started_at status tags_count can_delete expiration_policy_cleanup_status project - migration_state last_cleanup_deleted_tags_count] + migration_state last_cleanup_deleted_tags_count user_permissions] it { expect(described_class.graphql_name).to eq('ContainerRepository') } @@ -15,6 +15,8 @@ RSpec.describe GitlabSchema.types['ContainerRepository'] do it { expect(described_class).to have_graphql_fields(fields) } + it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::ContainerRepository) } + describe 'status field' do subject { described_class.fields['status'] } diff --git a/spec/graphql/types/permission_types/container_repository_spec.rb b/spec/graphql/types/permission_types/container_repository_spec.rb new file mode 100644 index 00000000000..1d8d9e994ed --- /dev/null +++ b/spec/graphql/types/permission_types/container_repository_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe GitlabSchema.types['ContainerRepositoryPermissions'], feature_category: :container_registry do + it 'has the expected fields' do + expected_permissions = [:destroy_container_repository] + + expect(described_class).to have_graphql_fields(expected_permissions).only + end +end diff --git a/spec/graphql/types/permission_types/container_repository_tag_spec.rb b/spec/graphql/types/permission_types/container_repository_tag_spec.rb new file mode 100644 index 00000000000..69d60ba621b --- /dev/null +++ b/spec/graphql/types/permission_types/container_repository_tag_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe GitlabSchema.types['ContainerRepositoryTagPermissions'], feature_category: :container_registry do + it 'has the expected fields' do + expected_permissions = [:destroy_container_repository_tag] + + expect(described_class).to have_graphql_fields(expected_permissions).only + end +end |