diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/requests/api/error_tracking/collector_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/requests/api/error_tracking/collector_spec.rb')
-rw-r--r-- | spec/requests/api/error_tracking/collector_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/requests/api/error_tracking/collector_spec.rb b/spec/requests/api/error_tracking/collector_spec.rb index fa0b238dcad..c0d7eb5460f 100644 --- a/spec/requests/api/error_tracking/collector_spec.rb +++ b/spec/requests/api/error_tracking/collector_spec.rb @@ -152,7 +152,17 @@ RSpec.describe API::ErrorTracking::Collector do context 'collector fails with validation error' do before do allow(::ErrorTracking::CollectErrorService) - .to receive(:new).and_raise(ActiveRecord::RecordInvalid) + .to receive(:new).and_raise(Gitlab::ErrorTracking::ErrorRepository::DatabaseError) + end + + it_behaves_like 'bad request' + end + + context 'with platform field too long' do + let(:params) do + event = Gitlab::Json.parse(raw_event) + event['platform'] = 'a' * 256 + Gitlab::Json.dump(event) end it_behaves_like 'bad request' |