diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-21 18:08:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-21 18:08:00 +0000 |
commit | 6f03d13ddbc2ac2f18517ce2c8b838f89a774c7c (patch) | |
tree | 272a680c85e66c5779c8cb9f3eaeef6921fee171 /spec/models/packages | |
parent | a6389df9f6760652a04933624aff7182bb851739 (diff) | |
download | gitlab-ce-6f03d13ddbc2ac2f18517ce2c8b838f89a774c7c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/packages')
-rw-r--r-- | spec/models/packages/package_spec.rb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/spec/models/packages/package_spec.rb b/spec/models/packages/package_spec.rb index b2c1d51e4af..449e30f9fb7 100644 --- a/spec/models/packages/package_spec.rb +++ b/spec/models/packages/package_spec.rb @@ -1006,37 +1006,4 @@ RSpec.describe Packages::Package, type: :model do it_behaves_like 'not enqueuing a sync worker job' end end - - context 'destroying a composer package' do - let_it_be(:package_name) { 'composer-package-name' } - let_it_be(:json) { { 'name' => package_name } } - let_it_be(:project) { create(:project, :custom_repo, files: { 'composer.json' => json.to_json } ) } - - let!(:package) { create(:composer_package, :with_metadatum, project: project, name: package_name, version: '1.0.0', json: json) } - - before do - Gitlab::Composer::Cache.new(project: project, name: package_name).execute - package.composer_metadatum.reload - end - - context 'with feature flag disabled' do - before do - stub_feature_flags(disable_composer_callback: false) - end - - it 'schedule the update job' do - expect(::Packages::Composer::CacheUpdateWorker).to receive(:perform_async).with(project.id, package_name, package.composer_metadatum.version_cache_sha) - - package.destroy! - end - end - - context 'with feature flag enabled' do - it 'does nothing' do - expect(::Packages::Composer::CacheUpdateWorker).not_to receive(:perform_async) - - package.destroy! - end - end - end end |