diff options
Diffstat (limited to 'spec/services/notes/create_service_spec.rb')
-rw-r--r-- | spec/services/notes/create_service_spec.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/spec/services/notes/create_service_spec.rb b/spec/services/notes/create_service_spec.rb index 48f1d696ff6..1b9ba42cfd6 100644 --- a/spec/services/notes/create_service_spec.rb +++ b/spec/services/notes/create_service_spec.rb @@ -278,42 +278,5 @@ describe Notes::CreateService do expect(note.note).to eq(':smile:') end end - - context 'reply to individual note' do - let(:existing_note) { create(:note_on_issue, noteable: issue, project: project) } - let(:reply_opts) { opts.merge(in_reply_to_discussion_id: existing_note.discussion_id) } - - subject { described_class.new(project, user, reply_opts).execute } - - context 'when reply_to_individual_notes is disabled' do - before do - stub_feature_flags(reply_to_individual_notes: false) - end - - it 'creates an individual note' do - expect(subject.type).to eq(nil) - expect(subject.discussion_id).not_to eq(existing_note.discussion_id) - end - - it 'does not convert existing note' do - expect { subject }.not_to change { existing_note.reload.type } - end - end - - context 'when reply_to_individual_notes is enabled' do - before do - stub_feature_flags(reply_to_individual_notes: true) - end - - it 'creates a DiscussionNote in reply to existing note' do - expect(subject).to be_a(DiscussionNote) - expect(subject.discussion_id).to eq(existing_note.discussion_id) - end - - it 'converts existing note to DiscussionNote' do - expect { subject }.to change { existing_note.reload.type }.from(nil).to('DiscussionNote') - end - end - end end end |