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
91f0c33a
Commit
91f0c33a
authored
Jan 23, 2020
by
Sean Arnold
Committed by
Douglas Barbosa Alexandre
Jan 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use error tracking setting method directly
parent
94c364af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
app/services/error_tracking/issue_update_service.rb
app/services/error_tracking/issue_update_service.rb
+1
-5
spec/services/error_tracking/issue_update_service_spec.rb
spec/services/error_tracking/issue_update_service_spec.rb
+2
-3
No files found.
app/services/error_tracking/issue_update_service.rb
View file @
91f0c33a
...
...
@@ -11,7 +11,7 @@ module ErrorTracking
unless
parse_errors
(
response
).
present?
response
[
:closed_issue_iid
]
=
update_related_issue
&
.
iid
clear
_cache
project_error_tracking_setting
.
expire_issues
_cache
end
response
...
...
@@ -30,10 +30,6 @@ module ErrorTracking
close_and_create_note
(
related_issue
)
end
def
clear_cache
project_error_tracking_setting
.
clear_cache
(
'list_issues'
)
end
def
close_and_create_note
(
issue
)
return
unless
resolving?
&&
issue
.
opened?
...
...
spec/services/error_tracking/issue_update_service_spec.rb
View file @
91f0c33a
...
...
@@ -42,13 +42,12 @@ describe ErrorTracking::IssueUpdateService do
it
'clears the reactive cache'
do
allow
(
error_tracking_setting
)
.
to
receive
(
:
clear
_cache
)
.
to
receive
(
:
expire_issues
_cache
)
result
expect
(
error_tracking_setting
)
.
to
have_received
(
:clear_cache
)
.
with
(
'list_issues'
)
.
to
have_received
(
:expire_issues_cache
)
end
context
'related issue and resolving'
do
...
...
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