Welcome to mirror list, hosted at ThFree Co, Russian Federation.

destroy_service_spec.rb « notes « services « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4330190caaa7f9bb6fc345236b84a76bd8bb0464 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'spec_helper'

describe Notes::DestroyService 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