diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-06 01:21:02 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-12 14:24:05 +0200 |
commit | ba21c00f01bf4274d0e4cc3892293fc1e581b260 (patch) | |
tree | 1d9133b41f4e30b8775002c72ef78ec28d213ace /spec/services/notes | |
parent | 734df1bb504aedec6a5668567de808b549a84749 (diff) | |
download | gitlab-ce-ba21c00f01bf4274d0e4cc3892293fc1e581b260.tar.gz |
Delete notes via API
Diffstat (limited to 'spec/services/notes')
-rw-r--r-- | spec/services/notes/delete_service_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/notes/delete_service_spec.rb b/spec/services/notes/delete_service_spec.rb new file mode 100644 index 00000000000..88e71c135d3 --- /dev/null +++ b/spec/services/notes/delete_service_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe Notes::DeleteService, services: true do + let(:project) { create(:empty_project) } + let(:issue) { create(:issue, project: project) } + let(:user) { create(:user) } + let(:note) { create(:note, project: project, noteable: issue, author: user, note: 'Note') } + + describe '#execute' do + it 'deletes a note' do + Notes::DeleteService.new(project, user).execute(note) + expect(project.issues.find(issue.id).notes).to_not include(note) + end + end +end |