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
36d910a8
Commit
36d910a8
authored
Oct 14, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak specs and remove label return
parent
084cd09f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
ee/app/workers/incident_management/apply_incident_sla_exceeded_label_worker.rb
...nt_management/apply_incident_sla_exceeded_label_worker.rb
+0
-2
ee/spec/workers/incident_management/apply_incident_sla_exceeded_label_worker_spec.rb
...nagement/apply_incident_sla_exceeded_label_worker_spec.rb
+5
-7
No files found.
ee/app/workers/incident_management/apply_incident_sla_exceeded_label_worker.rb
View file @
36d910a8
...
...
@@ -18,8 +18,6 @@ module IncidentManagement
incident
.
labels
<<
label
add_resource_event
label
end
private
...
...
ee/spec/workers/incident_management/apply_incident_sla_exceeded_label_worker_spec.rb
View file @
36d910a8
...
...
@@ -21,20 +21,18 @@ RSpec.describe IncidentManagement::ApplyIncidentSlaExceededLabelWorker do
incident
.
labels
<<
label
end
it
'does not add a label'
do
it
'does not add a label'
,
:aggregate_failures
do
expect
{
subject
}.
not_to
change
{
incident
.
labels
.
reload
.
count
}
expect
(
incident
.
labels
.
reload
).
to
include
(
label
)
end
end
it
'adds a label to the incident'
do
it
'adds a label to the incident'
,
:aggregate_failures
do
expect
{
perform
}.
to
change
{
incident
.
labels
.
reload
.
count
}.
by
(
1
)
expected_label
=
project
.
labels
.
find_by!
(
IncidentManagement
::
CreateIncidentSlaExceededLabelService
::
LABEL_PROPERTIES
)
expect
(
perform
).
to
eq
(
expected_label
)
expect
(
incident
.
labels
.
reload
).
to
include
(
label
)
end
it
'adds a note that the label was added'
do
it
'adds a note that the label was added'
,
:aggregate_failures
do
expect
{
subject
}.
to
change
{
incident
.
resource_label_events
.
reload
.
count
}
event
=
incident
.
resource_label_events
.
first
...
...
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