diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-09 15:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-09 15:09:48 +0300 |
commit | 3c53fbc50bf8d084f1184836468850d2a83ef920 (patch) | |
tree | 85c451a4082e7b5e8dc3ecb6265edb1aef0b14f0 /spec/workers/new_note_worker_spec.rb | |
parent | e7462f7b49a60b2ee7be14682c23190f7f7c5ba7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/new_note_worker_spec.rb')
-rw-r--r-- | spec/workers/new_note_worker_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/workers/new_note_worker_spec.rb b/spec/workers/new_note_worker_spec.rb index 86b6d041e5c..7a8c1ff57f3 100644 --- a/spec/workers/new_note_worker_spec.rb +++ b/spec/workers/new_note_worker_spec.rb @@ -65,4 +65,14 @@ RSpec.describe NewNoteWorker do subject.perform(note.id) end end + + context 'when Note author has been deleted' do + let_it_be(:note) { create(:note, author: User.ghost) } + + it "does not call NotificationService" do + expect(NotificationService).not_to receive(:new) + + described_class.new.perform(note.id) + end + end end |