Commit c2a4bcdf authored by Arturo Herrero's avatar Arturo Herrero

Test available services name for EE services

parent 3399305f
...@@ -3,6 +3,17 @@ ...@@ -3,6 +3,17 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Service do RSpec.describe Service do
let(:ee_project_services) do
%w[
github
jenkins
]
end
describe '.available_services_names' do
it { expect(described_class.available_services_names).to include(*ee_project_services) }
end
describe '.project_specific_services_names' do describe '.project_specific_services_names' do
before do before do
allow(::Gitlab).to receive(:com?).and_return(com) allow(::Gitlab).to receive(:com?).and_return(com)
...@@ -11,13 +22,13 @@ RSpec.describe Service do ...@@ -11,13 +22,13 @@ 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 contain_exactly('github', 'jenkins') } it { expect(described_class.project_specific_services_names).to match_array(ee_project_services) }
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 contain_exactly('github', 'gitlab_slack_application', 'jenkins') } it { expect(described_class.project_specific_services_names).to match_array(ee_project_services + ['gitlab_slack_application']) }
end 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