diff options
Diffstat (limited to 'spec/services/packages/debian')
-rw-r--r-- | spec/services/packages/debian/parse_debian822_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/packages/debian/process_changes_service_spec.rb | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/services/packages/debian/parse_debian822_service_spec.rb b/spec/services/packages/debian/parse_debian822_service_spec.rb index ff146fda250..a2731816459 100644 --- a/spec/services/packages/debian/parse_debian822_service_spec.rb +++ b/spec/services/packages/debian/parse_debian822_service_spec.rb @@ -77,7 +77,7 @@ RSpec.describe Packages::Debian::ParseDebian822Service do 'Depends' => '${shlibs:Depends}, ${misc:Depends}', 'Description' => "Some mostly empty lib\nUsed in GitLab tests.\n\nTesting another paragraph." }, - 'Package: sample-udeb' => { + 'Package: sample-udeb' => { 'Package' => 'sample-udeb', 'Package-Type' => 'udeb', 'Architecture' => 'any', diff --git a/spec/services/packages/debian/process_changes_service_spec.rb b/spec/services/packages/debian/process_changes_service_spec.rb index 52bcddb6f5e..a45dd68cd6e 100644 --- a/spec/services/packages/debian/process_changes_service_spec.rb +++ b/spec/services/packages/debian/process_changes_service_spec.rb @@ -5,7 +5,8 @@ RSpec.describe Packages::Debian::ProcessChangesService do describe '#execute' do let_it_be(:user) { create(:user) } let_it_be_with_reload(:distribution) { create(:debian_project_distribution, :with_file, codename: 'unstable') } - let_it_be(:incoming) { create(:debian_incoming, project: distribution.project) } + + let!(:incoming) { create(:debian_incoming, project: distribution.project) } let(:package_file) { incoming.package_files.last } @@ -33,10 +34,11 @@ RSpec.describe Packages::Debian::ProcessChangesService do existing_package.update!(debian_distribution: distribution) end - it 'does not create a package' do + it 'does not create a package and assigns the package_file to the existing package' do expect { subject.execute } .to not_change { Packages::Package.count } .and not_change { Packages::PackageFile.count } + .and change(package_file, :package).to(existing_package) end context 'marked as pending_destruction' do |