Commit e42bf79d authored by Arturo Herrero's avatar Arturo Herrero

Test project specific services using class constants

parent fc7e85ae
...@@ -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