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

28 lines
667 B
Ruby
Raw Normal View History

2016-04-02 18:10:28 +05:30
require 'spec_helper'
describe Notes::PostProcessService, services: true do
let(:project) { create(:empty_project) }
let(:issue) { create(:issue, project: project) }
let(:user) { create(:user) }
2016-08-24 12:49:21 +05:30
describe '#execute' do
2016-04-02 18:10:28 +05:30
before do
project.team << [user, :master]
note_opts = {
note: 'Awesome comment',
noteable_type: 'Issue',
noteable_id: issue.id
}
@note = Notes::CreateService.new(project, user, note_opts).execute
end
it do
expect(project).to receive(:execute_hooks)
expect(project).to receive(:execute_services)
Notes::PostProcessService.new(@note).execute
end
end
end