summaryrefslogtreecommitdiff
path: root/spec/workers/packages/go/sync_packages_worker_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/workers/packages/go/sync_packages_worker_spec.rb')
-rw-r--r--spec/workers/packages/go/sync_packages_worker_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/workers/packages/go/sync_packages_worker_spec.rb b/spec/workers/packages/go/sync_packages_worker_spec.rb
index ad1a85b26e4..5eeef1f7c08 100644
--- a/spec/workers/packages/go/sync_packages_worker_spec.rb
+++ b/spec/workers/packages/go/sync_packages_worker_spec.rb
@@ -57,6 +57,18 @@ RSpec.describe Packages::Go::SyncPackagesWorker, type: :worker do
it_behaves_like 'it creates a package', '', 'v1.0.3'
it_behaves_like 'it creates a package', 'mod', 'v1.0.3'
it_behaves_like 'it creates a package', 'v2', 'v2.0.0'
+
+ context 'marked as pending_destruction' do
+ before do
+ project.packages.each(&:pending_destruction!)
+ end
+
+ it_behaves_like 'it creates a package', '', 'v1.0.1'
+ it_behaves_like 'it creates a package', '', 'v1.0.2'
+ it_behaves_like 'it creates a package', '', 'v1.0.3'
+ it_behaves_like 'it creates a package', 'mod', 'v1.0.3'
+ it_behaves_like 'it creates a package', 'v2', 'v2.0.0'
+ end
end
context 'with a package that exceeds project limits' do