diff options
Diffstat (limited to 'spec/requests/api/npm_instance_packages_spec.rb')
-rw-r--r-- | spec/requests/api/npm_instance_packages_spec.rb | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/spec/requests/api/npm_instance_packages_spec.rb b/spec/requests/api/npm_instance_packages_spec.rb index 4f965d86d66..7b74a052860 100644 --- a/spec/requests/api/npm_instance_packages_spec.rb +++ b/spec/requests/api/npm_instance_packages_spec.rb @@ -17,34 +17,7 @@ RSpec.describe API::NpmInstancePackages, feature_category: :package_registry do it_behaves_like 'handling get metadata requests', scope: :instance it_behaves_like 'rejects invalid package names' - - context 'with a duplicate package name in another project' do - let_it_be(:project2) { create(:project, :public, namespace: namespace) } - let_it_be(:package2) do - create(:npm_package, - project: project2, - name: "@#{group.path}/scoped_package", - version: '1.2.0') - end - - it 'includes all matching package versions in the response' do - subject - - expect(json_response['versions'].keys).to match_array([package.version, package2.version]) - end - - context 'with the feature flag disabled' do - before do - stub_feature_flags(npm_allow_packages_in_multiple_projects: false) - end - - it 'returns matching package versions from only one project' do - subject - - expect(json_response['versions'].keys).to match_array([package2.version]) - end - end - end + it_behaves_like 'handling get metadata requests for packages in multiple projects' context 'when metadata cache exists' do let_it_be(:npm_metadata_cache) { create(:npm_metadata_cache, package_name: package.name, project_id: project.id) } |