diff options
Diffstat (limited to 'spec/services/packages/maven/find_or_create_package_service_spec.rb')
-rw-r--r-- | spec/services/packages/maven/find_or_create_package_service_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/services/packages/maven/find_or_create_package_service_spec.rb b/spec/services/packages/maven/find_or_create_package_service_spec.rb index 82dffeefcde..2543ab0c669 100644 --- a/spec/services/packages/maven/find_or_create_package_service_spec.rb +++ b/spec/services/packages/maven/find_or_create_package_service_spec.rb @@ -36,10 +36,11 @@ RSpec.describe Packages::Maven::FindOrCreatePackageService do expect(pkg.version).to eq(version) end - context 'with a build' do + context 'with optional attributes' do subject { service.execute.payload[:package] } it_behaves_like 'assigns build to package' + it_behaves_like 'assigns status to package' end end @@ -111,6 +112,13 @@ RSpec.describe Packages::Maven::FindOrCreatePackageService do expect(subject.errors).to include('Duplicate package is not allowed') end + context 'when uploading to the versionless package which contains metadata about all versions' do + let(:version) { nil } + let(:param_path) { path } + + it_behaves_like 'reuse existing package' + end + context 'when uploading different non-duplicate files to the same package' do before do package_file = existing_package.package_files.find_by(file_name: 'my-app-1.0-20180724.124855-1.jar') |