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
f4835bb4
Commit
f4835bb4
authored
Mar 19, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add convenient method StatusPage.trigger_publish
parent
2dbbe9ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
ee/lib/status_page.rb
ee/lib/status_page.rb
+8
-0
ee/spec/lib/status_page_spec.rb
ee/spec/lib/status_page_spec.rb
+22
-0
No files found.
ee/lib/status_page.rb
0 → 100644
View file @
f4835bb4
# frozen_string_literal: true
module
StatusPage
# Convenient method to trigger a status page update.
def
self
.
trigger_publish
(
project
,
user
,
triggered_by
)
TriggerPublishService
.
new
(
project
,
user
,
triggered_by
).
execute
end
end
ee/spec/lib/status_page_spec.rb
0 → 100644
View file @
f4835bb4
# frozen_string_literal: true
require
'spec_helper'
describe
StatusPage
do
describe
'.trigger_publish'
do
let
(
:project
)
{
instance_double
(
Project
)
}
let
(
:user
)
{
instance_double
(
User
)
}
let
(
:triggered_by
)
{
instance_double
(
Issue
)
}
subject
{
described_class
.
trigger_publish
(
project
,
user
,
triggered_by
)
}
it
'delegates to TriggerPublishService'
do
expect_next_instance_of
(
StatusPage
::
TriggerPublishService
,
project
,
user
,
triggered_by
)
do
|
service
|
expect
(
service
).
to
receive
(
:execute
)
end
subject
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