Commit 91f0c33a authored by Sean Arnold's avatar Sean Arnold Committed by Douglas Barbosa Alexandre

Use error tracking setting method directly

parent 94c364af
......@@ -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?
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment