gitlab-org--gitlab-foss/spec/services/notes/destroy_service_spec.rb

16 lines
404 B
Ruby
Raw Normal View History

2016-04-05 19:21:02 -04:00
require 'spec_helper'
describe Notes::DestroyService do
2016-04-05 19:21:02 -04:00
describe '#execute' do
it 'deletes a note' do
project = create(:project)
2016-04-12 09:43:29 -04:00
issue = create(:issue, project: project)
note = create(:note, project: project, noteable: issue)
2016-04-06 13:04:17 -04:00
described_class.new(project, note.author).execute(note)
expect(project.issues.find(issue.id).notes).not_to include(note)
2016-04-05 19:21:02 -04:00
end
end
end