Commit 3da2b893 authored by Igor Drozdov's avatar Igor Drozdov

Merge branch '221136-docs-product-feedback-slack-notifications-service-doc-outdated' into 'master'

Fix order of integrations to be sorted alphabetically

Closes #221136

See merge request gitlab-org/gitlab!34501
parents 31c13529 64f4175e
......@@ -1253,7 +1253,7 @@ class Project < ApplicationRecord
available_services_names.map do |service_name|
find_or_initialize_service(service_name)
end
end.sort_by(&:title)
end
def disabled_services
......
---
title: Fix order of integrations to be sorted alphabetically
merge_request: 34501
author:
type: fixed
......@@ -5227,13 +5227,13 @@ describe Project do
describe '#find_or_initialize_services' do
it 'returns only enabled services' do
allow(Service).to receive(:available_services_names).and_return(%w[prometheus pushover])
allow(Service).to receive(:available_services_names).and_return(%w[prometheus pushover teamcity])
allow(subject).to receive(:disabled_services).and_return(%w[prometheus])
services = subject.find_or_initialize_services
expect(services.count).to eq 1
expect(services).to include(PushoverService)
expect(services.count).to eq(2)
expect(services.map(&:title)).to eq(['JetBrains TeamCity CI', 'Pushover'])
end
end
......
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