Commit 3f6418c6 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Test log message arguments

parent 395fa5e6
......@@ -54,8 +54,12 @@ RSpec.describe Gitlab::BackgroundMigration::PopulateMissingVulnerabilityDismissa
it 'writes log messages' do
subject.perform(vulnerability_1.id, vulnerability_2.id)
expect(::Gitlab::BackgroundMigration::Logger).to have_received(:info)
expect(::Gitlab::BackgroundMigration::Logger).to have_received(:warn)
expect(::Gitlab::BackgroundMigration::Logger).to have_received(:info).with(migrator: described_class.name,
message: 'Dismissal information has been copied',
count: 2)
expect(::Gitlab::BackgroundMigration::Logger).to have_received(:warn).with(migrator: described_class.name,
message: 'Could not update vulnerability!',
vulnerability_id: vulnerability_2.id)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment