diff options
Diffstat (limited to 'spec/workers/new_note_worker_spec.rb')
-rw-r--r-- | spec/workers/new_note_worker_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/workers/new_note_worker_spec.rb b/spec/workers/new_note_worker_spec.rb index 387a0958d6b..57269355180 100644 --- a/spec/workers/new_note_worker_spec.rb +++ b/spec/workers/new_note_worker_spec.rb @@ -27,7 +27,7 @@ describe NewNoteWorker do let(:unexistent_note_id) { non_existing_record_id } it 'logs NewNoteWorker process skipping' do - expect(Rails.logger).to receive(:error) + expect(Gitlab::AppLogger).to receive(:error) .with("NewNoteWorker: couldn't find note with ID=#{unexistent_note_id}, skipping job") described_class.new.perform(unexistent_note_id) @@ -49,4 +49,14 @@ describe NewNoteWorker do described_class.new.perform(unexistent_note_id) end end + + context 'when note is with review' do + it 'does not create a new note notification' do + note = create(:note, :with_review) + + expect_any_instance_of(NotificationService).not_to receive(:new_note) + + subject.perform(note.id) + end + end end |