diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/models/error_tracking/error_spec.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/models/error_tracking/error_spec.rb')
-rw-r--r-- | spec/models/error_tracking/error_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/error_tracking/error_spec.rb b/spec/models/error_tracking/error_spec.rb index 8591802d15c..57899985daf 100644 --- a/spec/models/error_tracking/error_spec.rb +++ b/spec/models/error_tracking/error_spec.rb @@ -3,6 +3,8 @@ require 'spec_helper' RSpec.describe ErrorTracking::Error, type: :model do + let_it_be(:error) { create(:error_tracking_error) } + describe 'relationships' do it { is_expected.to belong_to(:project) } it { is_expected.to have_many(:events) } @@ -13,4 +15,16 @@ RSpec.describe ErrorTracking::Error, type: :model do it { is_expected.to validate_presence_of(:description) } it { is_expected.to validate_presence_of(:actor) } end + + describe '#title' do + it { expect(error.title).to eq('ActionView::MissingTemplate Missing template posts/edit') } + end + + describe '#to_sentry_error' do + it { expect(error.to_sentry_error).to be_kind_of(Gitlab::ErrorTracking::Error) } + end + + describe '#to_sentry_detailed_error' do + it { expect(error.to_sentry_detailed_error).to be_kind_of(Gitlab::ErrorTracking::DetailedError) } + end end |