diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-22 12:09:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-22 12:09:06 +0300 |
commit | 0b54de365bc766260093c9584c7470aff96d14fd (patch) | |
tree | b5a7ee5ed10456a297db78a1f69467a5fc942db8 /spec/services | |
parent | 1064597e1c145474e270be1e926e5a2a7a6113a5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/packages/npm/generate_metadata_service_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/packages/npm/generate_metadata_service_spec.rb b/spec/services/packages/npm/generate_metadata_service_spec.rb index 1e3b0f71972..fdd0ab0ccee 100644 --- a/spec/services/packages/npm/generate_metadata_service_spec.rb +++ b/spec/services/packages/npm/generate_metadata_service_spec.rb @@ -11,7 +11,7 @@ RSpec.describe ::Packages::Npm::GenerateMetadataService, feature_category: :pack let_it_be(:package2) { create(:npm_package, version: '2.0.6', project: project, name: package_name) } let_it_be(:latest_package) { create(:npm_package, version: '2.0.11', project: project, name: package_name) } - let(:packages) { project.packages.npm.with_name(package_name).last_of_each_version } + let(:packages) { project.packages.npm.with_name(package_name) } let(:metadata) { described_class.new(package_name, packages).execute } describe '#versions' do @@ -157,14 +157,14 @@ RSpec.describe ::Packages::Npm::GenerateMetadataService, feature_category: :pack end def check_n_plus_one(only_dist_tags: false) - pkgs = project.packages.npm.with_name(package_name).last_of_each_version.preload_files + pkgs = project.packages.npm.with_name(package_name).preload_files control = ActiveRecord::QueryRecorder.new do described_class.new(package_name, pkgs).execute(only_dist_tags: only_dist_tags) end yield - pkgs = project.packages.npm.with_name(package_name).last_of_each_version.preload_files + pkgs = project.packages.npm.with_name(package_name).preload_files expect do described_class.new(package_name, pkgs).execute(only_dist_tags: only_dist_tags) |