diff options
Diffstat (limited to 'spec/workers/packages/maven/metadata/sync_worker_spec.rb')
-rw-r--r-- | spec/workers/packages/maven/metadata/sync_worker_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/workers/packages/maven/metadata/sync_worker_spec.rb b/spec/workers/packages/maven/metadata/sync_worker_spec.rb index 7e0f3616491..10482b3e327 100644 --- a/spec/workers/packages/maven/metadata/sync_worker_spec.rb +++ b/spec/workers/packages/maven/metadata/sync_worker_spec.rb @@ -61,9 +61,10 @@ RSpec.describe Packages::Maven::Metadata::SyncWorker, type: :worker do let(:project) { create(:project) } it 'does not create the updated metadata files' do + expect(worker).to receive(:log_extra_metadata_on_done).with(:message, 'Non existing versionless package(s). Nothing to do.') + expect { subject } .to change { ::Packages::PackageFile.count }.by(0) - .and raise_error(described_class::SyncError, 'Non existing versionless package') end end @@ -146,9 +147,10 @@ RSpec.describe Packages::Maven::Metadata::SyncWorker, type: :worker do let(:project) { create(:project) } it 'does not create the updated metadata files' do + expect(worker).to receive(:log_extra_metadata_on_done).with(:message, 'Non existing versionless package(s). Nothing to do.') + expect { subject } .to change { ::Packages::PackageFile.count }.by(0) - .and raise_error(described_class::SyncError, 'Non existing versionless package') end end |