Commit b24e475b authored by Sean Arnold's avatar Sean Arnold

Make external_url public and add test to ensure it

parent c4b114cd
......@@ -5,6 +5,10 @@ module ErrorTracking
DEFAULT_ISSUE_STATUS = 'unresolved'
DEFAULT_LIMIT = 20
def external_url
project_error_tracking_setting&.sentry_external_url
end
private
def fetch
......@@ -15,10 +19,6 @@ module ErrorTracking
{ issues: response[:issues] }
end
def external_url
project_error_tracking_setting&.sentry_external_url
end
def issue_status
params[:issue_status] || DEFAULT_ISSUE_STATUS
end
......
......@@ -45,4 +45,12 @@ describe ErrorTracking::ListIssuesService do
include_examples 'error tracking service unauthorized user'
include_examples 'error tracking service disabled'
end
describe '#external_url' do
it 'calls the project setting sentry_external_url' do
expect(error_tracking_setting).to receive(:sentry_external_url)
subject.external_url
end
end
end
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