Commit 0ce46ab4 authored by Sean Arnold's avatar Sean Arnold

Update after SentryIssueFinder changes

- Return closed_issue_iid when issue is closed
- Modify issue update service to check for closed issue
parent 11df2291
...@@ -47,9 +47,9 @@ module ErrorTracking ...@@ -47,9 +47,9 @@ module ErrorTracking
end end
def related_issue def related_issue
SentryIssuesFinder SentryIssueFinder
.new(project, current_user) .new(project, current_user: current_user)
.find_by_identifier(params[:issue_id]) .execute(params[:issue_id])
&.issue &.issue
end end
......
...@@ -48,8 +48,8 @@ describe ErrorTracking::IssueUpdateService do ...@@ -48,8 +48,8 @@ describe ErrorTracking::IssueUpdateService do
let(:issue_close_service) { spy(:issue_close_service) } let(:issue_close_service) { spy(:issue_close_service) }
before do before do
allow_any_instance_of(SentryIssuesFinder) allow_any_instance_of(SentryIssueFinder)
.to receive(:find_by_identifier) .to receive(:execute)
.and_return(sentry_issue) .and_return(sentry_issue)
allow(Issues::CloseService) allow(Issues::CloseService)
......
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