diff options
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/clusters/build_service_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/services/clusters/build_service_spec.rb b/spec/services/clusters/build_service_spec.rb new file mode 100644 index 00000000000..da0cb42b3a1 --- /dev/null +++ b/spec/services/clusters/build_service_spec.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Clusters::BuildService do + describe '#execute' do + subject { described_class.new(cluster_subject).execute } + + describe 'when cluster subject is a project' do + let(:cluster_subject) { build(:project) } + + it 'sets the cluster_type to project_type' do + is_expected.to be_project_type + end + end + + describe 'when cluster subject is a group' do + let(:cluster_subject) { build(:group) } + + it 'sets the cluster_type to group_type' do + is_expected.to be_group_type + end + end + end +end |