Commit e1be9842 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '235857-sentryerrortype-project_id-returns-a-project-global-id' into 'master'

Change type of "SentryErrorType#project_id" Global ID

See merge request gitlab-org/gitlab!42185
parents 90b901fb 589b28fd
......@@ -14,7 +14,7 @@ class SentryErrorPresenter < Gitlab::View::Presenter::Delegated
end
def project_id
Gitlab::GlobalId.build(model_name: 'Project', id: error.project_id).to_s
Gitlab::GlobalId.build(model_name: 'SentryProject', id: error.project_id).to_s
end
def frequency
......
---
title: Fix type of SentryErrorType global ID
merge_request: 42185
author:
type: fixed
......@@ -26,4 +26,12 @@ RSpec.describe SentryErrorPresenter do
expect(count).to eq error.frequency.first[1]
end
end
describe '#project_id' do
subject { presenter.project_id }
it 'returns a global ID of the correct type' do
expect(subject).to eq(Gitlab::GlobalId.build(model_name: 'SentryProject', id: error.project_id).to_s)
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