0dacf3c169
* Changed name of delete_user_service and worker to destroy * Move and change delete_group_service to Groups::DestroyService * Rename Notes::DeleteService to Notes::DestroyService
15 lines
426 B
Ruby
15 lines
426 B
Ruby
require 'spec_helper'
|
|
|
|
describe Notes::DestroyService, services: true do
|
|
describe '#execute' do
|
|
it 'deletes a note' do
|
|
project = create(:empty_project)
|
|
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
|