diff options
Diffstat (limited to 'spec/lib/gitlab/email/handler/create_note_handler_spec.rb')
-rw-r--r-- | spec/lib/gitlab/email/handler/create_note_handler_spec.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb index 8872800069a..e76a5d3fe32 100644 --- a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb +++ b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb @@ -59,7 +59,7 @@ RSpec.describe Gitlab::Email::Handler::CreateNoteHandler do end shared_examples 'a reply to existing comment' do - it 'creates a comment' do + it 'creates a discussion' do expect { receiver.execute }.to change { noteable.notes.count }.by(1) new_note = noteable.notes.last @@ -68,11 +68,7 @@ RSpec.describe Gitlab::Email::Handler::CreateNoteHandler do expect(new_note.note).to include('I could not disagree more.') expect(new_note.in_reply_to?(note)).to be_truthy - if note.part_of_discussion? - expect(new_note.discussion_id).to eq(note.discussion_id) - else - expect(new_note.discussion_id).not_to eq(note.discussion_id) - end + expect(new_note.discussion_id).to eq(note.discussion_id) end end |