Commit 19c8d3f3 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch '292796-test-alerts-service' into 'master'

Test project specific services using class constants

See merge request gitlab-org/gitlab!49819
parents 56d728a6 e42bf79d
...@@ -15,13 +15,19 @@ RSpec.describe Service do ...@@ -15,13 +15,19 @@ RSpec.describe Service do
context 'when not on gitlab.com' do context 'when not on gitlab.com' do
let(:com) { false } let(:com) { false }
it { expect(described_class.project_specific_services_names).to include('github') } it do
expect(described_class.project_specific_services_names)
.to include(*described_class::EE_PROJECT_SPECIFIC_SERVICE_NAMES)
end
end end
context 'when on gitlab.com' do context 'when on gitlab.com' do
let(:com) { true } let(:com) { true }
it { expect(described_class.project_specific_services_names).to include('github', 'gitlab_slack_application') } it do
expect(described_class.project_specific_services_names)
.to include(*described_class::EE_PROJECT_SPECIFIC_SERVICE_NAMES, *Service::EE_COM_PROJECT_SPECIFIC_SERVICE_NAMES)
end
end end
end end
end end
...@@ -921,6 +921,9 @@ RSpec.describe Service do ...@@ -921,6 +921,9 @@ RSpec.describe Service do
end end
describe '.project_specific_services_names' do describe '.project_specific_services_names' do
it { expect(described_class.project_specific_services_names).to include('jenkins') } it do
expect(described_class.project_specific_services_names)
.to include(*described_class::PROJECT_SPECIFIC_SERVICE_NAMES)
end
end end
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