From bc4eeb96ae5c7de96f7e8e16aa508e3308f06c5b Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Mon, 24 Apr 2017 12:24:34 -0500 Subject: Ensure replying to an individual note by email creates a note with its own discussion ID --- spec/models/sent_notification_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec/models/sent_notification_spec.rb') diff --git a/spec/models/sent_notification_spec.rb b/spec/models/sent_notification_spec.rb index 6b7eef388be..5710edbc9e0 100644 --- a/spec/models/sent_notification_spec.rb +++ b/spec/models/sent_notification_spec.rb @@ -69,6 +69,7 @@ describe SentNotification, model: true do it 'creates a comment on the issue' do new_note = subject.create_reply('Test') expect(new_note.in_reply_to?(note)).to be_truthy + expect(new_note.discussion_id).not_to eq(note.discussion_id) end end @@ -79,6 +80,7 @@ describe SentNotification, model: true do it 'creates a reply on the discussion' do new_note = subject.create_reply('Test') expect(new_note.in_reply_to?(note)).to be_truthy + expect(new_note.discussion_id).to eq(note.discussion_id) end end @@ -99,6 +101,7 @@ describe SentNotification, model: true do it 'creates a comment on the merge request' do new_note = subject.create_reply('Test') expect(new_note.in_reply_to?(note)).to be_truthy + expect(new_note.discussion_id).not_to eq(note.discussion_id) end end @@ -109,6 +112,7 @@ describe SentNotification, model: true do it 'creates a reply on the discussion' do new_note = subject.create_reply('Test') expect(new_note.in_reply_to?(note)).to be_truthy + expect(new_note.discussion_id).to eq(note.discussion_id) end end @@ -119,6 +123,7 @@ describe SentNotification, model: true do it 'creates a reply on the discussion' do new_note = subject.create_reply('Test') expect(new_note.in_reply_to?(note)).to be_truthy + expect(new_note.discussion_id).to eq(note.discussion_id) end end @@ -140,6 +145,7 @@ describe SentNotification, model: true do it 'creates a comment on the commit' do new_note = subject.create_reply('Test') expect(new_note.in_reply_to?(note)).to be_truthy + expect(new_note.discussion_id).not_to eq(note.discussion_id) end end @@ -150,6 +156,7 @@ describe SentNotification, model: true do it 'creates a reply on the discussion' do new_note = subject.create_reply('Test') expect(new_note.in_reply_to?(note)).to be_truthy + expect(new_note.discussion_id).to eq(note.discussion_id) end end @@ -160,6 +167,7 @@ describe SentNotification, model: true do it 'creates a reply on the discussion' do new_note = subject.create_reply('Test') expect(new_note.in_reply_to?(note)).to be_truthy + expect(new_note.discussion_id).to eq(note.discussion_id) end end end -- cgit v1.2.1