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
972338b2
Commit
972338b2
authored
Mar 16, 2022
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for case with no images
parent
4f565864
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
ee/spec/services/ee/alert_management/create_alert_issue_service_spec.rb
...es/ee/alert_management/create_alert_issue_service_spec.rb
+9
-1
No files found.
ee/spec/services/ee/alert_management/create_alert_issue_service_spec.rb
View file @
972338b2
...
...
@@ -6,7 +6,7 @@ RSpec.describe AlertManagement::CreateAlertIssueService do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:alert
)
{
create
(
:alert_management_alert
,
project:
project
)
}
let_it_be
_with_reload
(
:alert
)
{
create
(
:alert_management_alert
,
project:
project
)
}
describe
'#execute'
do
subject
(
:execute
)
{
described_class
.
new
(
alert
,
user
).
execute
}
...
...
@@ -30,6 +30,14 @@ RSpec.describe AlertManagement::CreateAlertIssueService do
expect_image_matches
(
second_metric_image
,
image_2
)
end
context
'when there are no metric images to copy'
do
it
'has no images'
do
incident
=
execute
.
payload
[
:issue
]
expect
(
incident
.
metric_images
.
count
).
to
eq
(
0
)
end
end
private
def
expect_image_matches
(
image
,
image_expectation
)
...
...
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