diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
commit | 14bd84b61276ef29b97d23642d698de769bacfd2 (patch) | |
tree | f9eba90140c1bd874211dea17750a0d422c04080 /spec/lib/gitlab/exception_log_formatter_spec.rb | |
parent | 891c388697b2db0d8ee0c8358a9bdbf6dc56d581 (diff) |
Add latest changes from gitlab-org/gitlab@15-10-stable-eev15.10.0-rc42
Diffstat (limited to 'spec/lib/gitlab/exception_log_formatter_spec.rb')
-rw-r--r-- | spec/lib/gitlab/exception_log_formatter_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/exception_log_formatter_spec.rb b/spec/lib/gitlab/exception_log_formatter_spec.rb index 7dda56f0bf5..82166971603 100644 --- a/spec/lib/gitlab/exception_log_formatter_spec.rb +++ b/spec/lib/gitlab/exception_log_formatter_spec.rb @@ -45,6 +45,12 @@ RSpec.describe Gitlab::ExceptionLogFormatter do allow(exception).to receive(:cause).and_return(ActiveRecord::StatementInvalid.new(sql: 'SELECT "users".* FROM "users" WHERE "users"."id" = 1 AND "users"."foo" = $1')) end + it 'adds the cause_class to payload' do + described_class.format!(exception, payload) + + expect(payload['exception.cause_class']).to eq('ActiveRecord::StatementInvalid') + end + it 'adds the normalized SQL query to payload' do described_class.format!(exception, payload) |