Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-10 06:09:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-10 06:09:31 +0300
commit8de5e388c6046487419a11cb97924a762250c427 (patch)
tree5e350d487171a0a88d97e0c320b3dfb2e871fb15 /spec/workers/new_note_worker_spec.rb
parent5a120c32fda1c88e38bbce056d6f30f4a2f41bc6 (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.rb10
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 7a8c1ff57f3..7ba3fe94254 100644
--- a/spec/workers/new_note_worker_spec.rb
+++ b/spec/workers/new_note_worker_spec.rb
@@ -66,6 +66,16 @@ RSpec.describe NewNoteWorker do
end
end
+ context 'when Note author has been blocked' do
+ let_it_be(:note) { create(:note, author: create(:user, :blocked)) }
+
+ it "does not call NotificationService" do
+ expect(NotificationService).not_to receive(:new)
+
+ described_class.new.perform(note.id)
+ end
+ end
+
context 'when Note author has been deleted' do
let_it_be(:note) { create(:note, author: User.ghost) }