diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-06 21:13:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-06 21:13:45 +0300 |
commit | c38fb401d2e0348c0dbfd415c9818444dbe4951c (patch) | |
tree | aee27d8fd8758356c73b6654011effa270eb0f3a /spec/presenters/packages/pypi | |
parent | f20be8802a40405885e9421417809438e5772bf5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/presenters/packages/pypi')
-rw-r--r-- | spec/presenters/packages/pypi/package_presenter_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/presenters/packages/pypi/package_presenter_spec.rb b/spec/presenters/packages/pypi/package_presenter_spec.rb index 25aa5c31034..8a23c0ec3cb 100644 --- a/spec/presenters/packages/pypi/package_presenter_spec.rb +++ b/spec/presenters/packages/pypi/package_presenter_spec.rb @@ -52,5 +52,21 @@ RSpec.describe ::Packages::Pypi::PackagePresenter do it_behaves_like 'pypi package presenter' end + + context 'with package files pending destruction' do + let_it_be(:package_file_pending_destruction) { create(:package_file, :pending_destruction, package: package1, file_name: "package_file_pending_destruction") } + + let(:project_or_group) { project } + + it { is_expected.not_to include(package_file_pending_destruction.file_name)} + + context 'with packages_installable_package_files disabled' do + before do + stub_feature_flags(packages_installable_package_files: false) + end + + it { is_expected.to include(package_file_pending_destruction.file_name)} + end + end end end |