diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /spec/workers/new_note_worker_spec.rb | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) | |
download | gitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'spec/workers/new_note_worker_spec.rb')
-rw-r--r-- | spec/workers/new_note_worker_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/workers/new_note_worker_spec.rb b/spec/workers/new_note_worker_spec.rb index 21f10fa5bfb..86b6d041e5c 100644 --- a/spec/workers/new_note_worker_spec.rb +++ b/spec/workers/new_note_worker_spec.rb @@ -50,10 +50,16 @@ RSpec.describe NewNoteWorker do end end - context 'when note is with review' do - it 'does not create a new note notification' do - note = create(:note, :with_review) + context 'when note does not require notification' do + let(:note) { create(:note) } + + before do + allow_next_found_instance_of(Note) do |note| + allow(note).to receive(:skip_notification?).and_return(true) + end + end + it 'does not create a new note notification' do expect_any_instance_of(NotificationService).not_to receive(:new_note) subject.perform(note.id) |