Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fc00774e
Commit
fc00774e
authored
Mar 24, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Publish status page on issue destroy
parent
5e0243b5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
ee/app/services/ee/notes/destroy_service.rb
ee/app/services/ee/notes/destroy_service.rb
+1
-0
ee/spec/services/ee/notes/destroy_service_spec.rb
ee/spec/services/ee/notes/destroy_service_spec.rb
+21
-7
No files found.
ee/app/services/ee/notes/destroy_service.rb
View file @
fc00774e
...
...
@@ -10,6 +10,7 @@ module EE
super
Analytics
::
RefreshCommentsData
.
for_note
(
note
)
&
.
execute
(
force:
true
)
StatusPage
.
trigger_publish
(
project
,
current_user
,
note
)
end
end
end
...
...
ee/spec/services/ee/notes/destroy_service_spec.rb
View file @
fc00774e
...
...
@@ -3,11 +3,17 @@
require
'spec_helper'
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
'refresh analytics comment data'
do
let
(
:analytics_mock
)
{
instance_double
(
'Analytics::RefreshCommentsData'
)
}
it
'invokes forced Analytics::RefreshCommentsData'
do
...
...
@@ -15,7 +21,15 @@ describe Notes::DestroyService do
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment