diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-13 00:08:05 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-13 00:08:05 +0000 |
commit | 47b8f79a0896f406008d5a7eda2781f8da301e91 (patch) | |
tree | 1f15328719ca1215a2bd0ec6650ece0ca59de3f4 /spec/services/notes/create_service_spec.rb | |
parent | 52fe64b740a4ddbd5b085386dfe40fea191174ea (diff) | |
download | gitlab-ce-47b8f79a0896f406008d5a7eda2781f8da301e91.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/notes/create_service_spec.rb')
-rw-r--r-- | spec/services/notes/create_service_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/services/notes/create_service_spec.rb b/spec/services/notes/create_service_spec.rb index 79ea8f48a58..8fd03428eb2 100644 --- a/spec/services/notes/create_service_spec.rb +++ b/spec/services/notes/create_service_spec.rb @@ -382,6 +382,19 @@ describe Notes::CreateService do end.to change { existing_note.type }.from(nil).to('DiscussionNote') .and change { existing_note.updated_at } end + + context 'discussion to reply cannot be found' do + before do + existing_note.delete + end + + it 'returns an note with errors' do + note = subject + + expect(note.errors).not_to be_empty + expect(note.errors[:base]).to eq(['Discussion to reply to cannot be found']) + end + end end describe "usage counter" do |