Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-12-10 15:33:36 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-12-10 16:14:20 +0300
commitecda32eaa293f094bd33b8c792ea78071b0be8e7 (patch)
tree4c785ec2cc91a3f01351d710c97b9320caff5a02 /spec/services
parent01dc3c966f35f851b2cd028605d3cb50e8f6b64c (diff)
Extract Clusters::BuildService
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/clusters/build_service_spec.rb25
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