Commit c938349f authored by Sean Arnold's avatar Sean Arnold

Fix specs and syntax

- Add changlog
parent 7e70ed4c
......@@ -81,7 +81,7 @@ class AlertsService < Service
end
def update_http_integration
return unless type == 'AlertsService'
return unless project_id && type == 'AlertsService'
AlertManagement::SyncAlertServiceDataService # rubocop: disable CodeReuse/ServiceClass
.new(self)
......
......@@ -2,7 +2,6 @@
module AlertManagement
class SyncAlertServiceDataService
# @param alert_service [AlertsService]
def initialize(alert_service)
@alert_service = alert_service
......@@ -23,9 +22,9 @@ module AlertManagement
def find_http_integration
AlertManagement::HttpIntegrationsFinder.new(
alert_service.project,
endpoint_identifier: ::AlertManagement::HttpIntegration::LEGACY_IDENTIFIER
)
alert_service.project,
endpoint_identifier: ::AlertManagement::HttpIntegration::LEGACY_IDENTIFIER
)
.execute
.first
end
......
---
title: Migrate Alert Service to HTTP Integrations model
merge_request: 46188
author:
type: added
......@@ -25,7 +25,7 @@ RSpec.describe AlertManagement::SyncAlertServiceDataService do
end
context 'existing other http integration' do
let_it_be(:integration) { create(:alert_management_http_integration, project: alerts_service.project) }
let_it_be(:integration) { create(:alert_management_http_integration, project: alerts_service.project) }
it 'does not update the integration' do
expect { subject }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment