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
786a5a45
Commit
786a5a45
authored
Aug 06, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks to fix specs
parent
ee20ecd3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
spec/presenters/alert_management/alert_presenter_spec.rb
spec/presenters/alert_management/alert_presenter_spec.rb
+3
-1
spec/presenters/alert_management/prometheus_alert_presenter_spec.rb
...nters/alert_management/prometheus_alert_presenter_spec.rb
+1
-1
spec/presenters/projects/prometheus/alert_presenter_spec.rb
spec/presenters/projects/prometheus/alert_presenter_spec.rb
+1
-1
No files found.
spec/presenters/alert_management/alert_presenter_spec.rb
View file @
786a5a45
...
...
@@ -4,7 +4,8 @@ require 'spec_helper'
RSpec
.
describe
AlertManagement
::
AlertPresenter
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:generic_payload
)
do
let
(
:generic_payload
)
do
{
'title'
=>
'Alert title'
,
'start_time'
=>
'2020-04-27T10:10:22.265949279Z'
,
...
...
@@ -12,6 +13,7 @@ RSpec.describe AlertManagement::AlertPresenter do
'runbook'
=>
'https://runbook.com'
}
end
let_it_be
(
:alert
)
do
build
(
:alert_management_alert
,
:with_description
,
:with_host
,
:with_service
,
:with_monitoring_tool
,
project:
project
,
payload:
generic_payload
)
end
...
...
spec/presenters/alert_management/prometheus_alert_presenter_spec.rb
View file @
786a5a45
...
...
@@ -16,7 +16,7 @@ RSpec.describe AlertManagement::PrometheusAlertPresenter do
}
end
let
(
:alert
)
do
let
!
(
:alert
)
do
create
(
:alert_management_alert
,
:prometheus
,
project:
project
,
payload:
payload
)
end
...
...
spec/presenters/projects/prometheus/alert_presenter_spec.rb
View file @
786a5a45
...
...
@@ -299,7 +299,7 @@ RSpec.describe Projects::Prometheus::AlertPresenter do
it
{
is_expected
.
to
eq
(
nil
)
}
context
'alert management alert present'
do
let
(
:am_alert
)
{
create
(
:alert_management_alert
,
project:
project
)
}
let
_it_be
(
:am_alert
)
{
create
(
:alert_management_alert
,
project:
project
)
}
let
(
:alert
)
{
create
(
:alerting_alert
,
project:
project
,
payload:
payload
,
alert:
am_alert
)
}
it
{
is_expected
.
to
eq
(
"http://localhost/
#{
project
.
full_path
}
/-/alert_management/
#{
am_alert
.
id
}
/details"
)
}
...
...
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