Commit fc00774e authored by Peter Leitzen's avatar Peter Leitzen

Publish status page on issue destroy

parent 5e0243b5
...@@ -10,6 +10,7 @@ module EE ...@@ -10,6 +10,7 @@ module EE
super super
Analytics::RefreshCommentsData.for_note(note)&.execute(force: true) Analytics::RefreshCommentsData.for_note(note)&.execute(force: true)
StatusPage.trigger_publish(project, current_user, note)
end end
end end
end end
......
...@@ -3,11 +3,17 @@ ...@@ -3,11 +3,17 @@
require 'spec_helper' require 'spec_helper'
describe Notes::DestroyService do describe Notes::DestroyService do
subject { described_class.new(note.project) } let_it_be(:project, refind: true) { create(:project) }
let_it_be(:user) { create(:user) }
let(:note) { create(:note) } let_it_be(:note, refind: true) do
create(:note_on_issue, project: project, author: user)
end
subject(:service) { described_class.new(project, user) }
describe '#execute' do describe '#execute' do
describe 'refresh analytics comment data' do
let(:analytics_mock) { instance_double('Analytics::RefreshCommentsData') } let(:analytics_mock) { instance_double('Analytics::RefreshCommentsData') }
it 'invokes forced Analytics::RefreshCommentsData' do it 'invokes forced Analytics::RefreshCommentsData' do
...@@ -15,7 +21,15 @@ describe Notes::DestroyService do ...@@ -15,7 +21,15 @@ describe Notes::DestroyService do
expect(analytics_mock).to receive(:execute).with(force: true) expect(analytics_mock).to receive(:execute).with(force: true)
subject.execute(note) service.execute(note)
end
end
describe 'publish to status page' do
let(:execute) { service.execute(note) }
let(:issue_id) { note.noteable_id }
include_examples 'trigger status page publish'
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment