Commit 5b4a3b81 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'sy-remove-alerts-service-activated-helper' into 'master'

Remove obsolete alerts service helper

See merge request gitlab-org/gitlab!49281
parents d5773bb8 61871fcb
......@@ -2430,10 +2430,6 @@ class Project < ApplicationRecord
protected_branches.limit(limit)
end
def alerts_service_activated?
alerts_service&.active?
end
def self_monitoring?
Gitlab::CurrentSettings.self_monitoring_project_id == id
end
......
......@@ -6275,28 +6275,6 @@ RSpec.describe Project, factory_default: :keep do
end
end
describe '#alerts_service_activated?' do
let!(:project) { create(:project) }
subject { project.alerts_service_activated? }
context 'when project has an activated alerts service' do
before do
create(:alerts_service, project: project)
end
it { is_expected.to be_truthy }
end
context 'when project has an inactive alerts service' do
before do
create(:alerts_service, :inactive, project: project)
end
it { is_expected.to be_falsey }
end
end
describe '#prometheus_service_active?' do
let(:project) { create(:project) }
......
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