diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 18:07:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 18:07:45 +0300 |
commit | 1219a9dce91f4edbc135dfc08299b4122b4825a8 (patch) | |
tree | e7d12a55d75a2d56e60d9527bef3724e3578866d /spec/workers/incident_management | |
parent | 1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/incident_management')
-rw-r--r-- | spec/workers/incident_management/process_prometheus_alert_worker_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb b/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb index 19ef2635882..5fbc39cad4e 100644 --- a/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb +++ b/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb @@ -60,7 +60,7 @@ describe IncidentManagement::ProcessPrometheusAlertWorker do end context 'when project could not be found' do - let(:non_existing_project_id) { (Project.maximum(:id) || 0) + 1 } + let(:non_existing_project_id) { non_existing_record_id } it 'does not create an issue' do expect { subject.perform(non_existing_project_id, alert_params) } @@ -75,7 +75,7 @@ describe IncidentManagement::ProcessPrometheusAlertWorker do context 'when event could not be found' do before do - alert_params[:labels][:gitlab_alert_id] = (PrometheusAlertEvent.maximum(:id) || 0) + 1 + alert_params[:labels][:gitlab_alert_id] = non_existing_record_id end it 'does not create an issue' do |