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

16 lines
425 B
Ruby
Raw Normal View History

2016-04-05 19:21:02 -04:00
require 'spec_helper'
describe Notes::DeleteService, services: true do
describe '#execute' do
it 'deletes a note' do
2016-04-12 09:43:29 -04:00
project = create(:empty_project)
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