diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 12:07:12 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 12:07:12 +0000 |
commit | 43771438e9ccf20d1b6cf12b690e63844d7c3d49 (patch) | |
tree | 147aefba22d99be62ff3c112f50e205e486e58c7 /spec/lib/gitlab/alert_management/payload/prometheus_spec.rb | |
parent | eeb25534bae1021f5b7940138ee56dea8fc79949 (diff) | |
download | gitlab-ce-43771438e9ccf20d1b6cf12b690e63844d7c3d49.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/alert_management/payload/prometheus_spec.rb')
-rw-r--r-- | spec/lib/gitlab/alert_management/payload/prometheus_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/alert_management/payload/prometheus_spec.rb b/spec/lib/gitlab/alert_management/payload/prometheus_spec.rb index 6a4f35c01e3..8ead292c27a 100644 --- a/spec/lib/gitlab/alert_management/payload/prometheus_spec.rb +++ b/spec/lib/gitlab/alert_management/payload/prometheus_spec.rb @@ -297,4 +297,18 @@ RSpec.describe Gitlab::AlertManagement::Payload::Prometheus do it { is_expected.to be_nil } end end + + describe '#source' do + subject { parsed_payload.source } + + it { is_expected.to eq('Prometheus') } + + context 'with alerting integration provided' do + before do + parsed_payload.integration = instance_double('::AlertManagement::HttpIntegration', name: 'INTEGRATION') + end + + it { is_expected.to eq('INTEGRATION') } + end + end end |