debian-mirror-gitlab/spec/services/notes/destroy_service_spec.rb

16 lines
404 B
Ruby
Raw Normal View History

2016-06-02 11:05:42 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
describe Notes::DestroyService do
2016-06-02 11:05:42 +05:30
describe '#execute' do
it 'deletes a note' do
2017-09-10 17:25:29 +05:30
project = create(:project)
2016-06-02 11:05:42 +05:30
issue = create(:issue, project: project)
note = create(:note, project: project, noteable: issue)
described_class.new(project, note.author).execute(note)
expect(project.issues.find(issue.id).notes).not_to include(note)
end
end
end