Welcome to mirror list, hosted at ThFree Co, Russian Federation.

policy_type_spec.rb « cleanup « packages « types « graphql « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f48651ed832060a4c6f70ba9a1fe4cf9d74a111a (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
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe GitlabSchema.types['PackagesCleanupPolicy'] do
  specify { expect(described_class.graphql_name).to eq('PackagesCleanupPolicy') }

  specify do
    expect(described_class.description)
      .to eq('A packages cleanup policy designed to keep only packages and packages assets that matter most')
  end

  specify { expect(described_class).to require_graphql_authorizations(:admin_package) }

  describe 'keep_n_duplicated_package_files' do
    subject { described_class.fields['keepNDuplicatedPackageFiles'] }

    it { is_expected.to have_non_null_graphql_type(Types::Packages::Cleanup::KeepDuplicatedPackageFilesEnum) }
  end

  describe 'next_run_at' do
    subject { described_class.fields['nextRunAt'] }

    it { is_expected.to have_nullable_graphql_type(Types::TimeType) }
  end
end