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 ...@@ -11,7 +11,7 @@ module ErrorTracking
unless parse_errors(response).present? unless parse_errors(response).present?
response[:closed_issue_iid] = update_related_issue&.iid response[:closed_issue_iid] = update_related_issue&.iid
clear_cache project_error_tracking_setting.expire_issues_cache
end end
response response
...@@ -30,10 +30,6 @@ module ErrorTracking ...@@ -30,10 +30,6 @@ module ErrorTracking
close_and_create_note(related_issue) close_and_create_note(related_issue)
end end
def clear_cache
project_error_tracking_setting.clear_cache('list_issues')
end
def close_and_create_note(issue) def close_and_create_note(issue)
return unless resolving? && issue.opened? return unless resolving? && issue.opened?
......
...@@ -42,13 +42,12 @@ describe ErrorTracking::IssueUpdateService do ...@@ -42,13 +42,12 @@ describe ErrorTracking::IssueUpdateService do
it 'clears the reactive cache' do it 'clears the reactive cache' do
allow(error_tracking_setting) allow(error_tracking_setting)
.to receive(:clear_cache) .to receive(:expire_issues_cache)
result result
expect(error_tracking_setting) expect(error_tracking_setting)
.to have_received(:clear_cache) .to have_received(:expire_issues_cache)
.with('list_issues')
end end
context 'related issue and resolving' do 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