diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-07-22 23:36:50 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-07-22 23:36:50 +0300 |
commit | 6c04066d4599af2efd4db43b2933003b8493e8dd (patch) | |
tree | 133cbf315912a97bdb001ebf23e2b51bc239a5bd /spec/models | |
parent | da6b7a12a6051995b4b68b783d8876f51640eddf (diff) | |
parent | 88bf3fe8b4c07d38b331fc1d72487ba2b351395c (diff) |
Merge branch 'group_with_cluster_factory' into 'master'
Adds cluster_for_group factory for convenience
See merge request gitlab-org/gitlab-ce!30826
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/concerns/deployment_platform_spec.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/models/concerns/deployment_platform_spec.rb b/spec/models/concerns/deployment_platform_spec.rb index 2378f400540..c4f9f62ece5 100644 --- a/spec/models/concerns/deployment_platform_spec.rb +++ b/spec/models/concerns/deployment_platform_spec.rb @@ -46,12 +46,11 @@ describe DeploymentPlatform do end context 'when child group has configured kubernetes cluster', :nested_groups do - let!(:child_group1_cluster) { create(:cluster, :provided_by_gcp, :group) } - let(:child_group1) { child_group1_cluster.group } + let(:child_group1) { create(:group, parent: group) } + let!(:child_group1_cluster) { create(:cluster_for_group, groups: [child_group1]) } before do project.update!(group: child_group1) - child_group1.update!(parent: group) end it 'returns the Kubernetes platform for the child group' do @@ -59,11 +58,10 @@ describe DeploymentPlatform do end context 'deeply nested group' do - let!(:child_group2_cluster) { create(:cluster, :provided_by_gcp, :group) } - let(:child_group2) { child_group2_cluster.group } + let(:child_group2) { create(:group, parent: child_group1) } + let!(:child_group2_cluster) { create(:cluster_for_group, groups: [child_group2]) } before do - child_group2.update!(parent: child_group1) project.update!(group: child_group2) end |