summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-12-06 00:22:02 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-12-06 00:22:30 +0100
commitdb1b0e5b63de9070b96a6a087da97000dcb3625e (patch)
treee93dfa2dfe29c20b21d8548ec3af0c375ce5d46c /spec/controllers
parentdbb8644c240615f8a264b3b0f49fa9936d69fd3d (diff)
downloadgitlab-ce-db1b0e5b63de9070b96a6a087da97000dcb3625e.tar.gz
Fix gcp|user_controller_specs
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/clusters/gcp_controller_spec.rb6
-rw-r--r--spec/controllers/projects/clusters/user_controller_spec.rb4
2 files changed, 6 insertions, 4 deletions
diff --git a/spec/controllers/projects/clusters/gcp_controller_spec.rb b/spec/controllers/projects/clusters/gcp_controller_spec.rb
index bb5ef7bb365..ee7928beb7e 100644
--- a/spec/controllers/projects/clusters/gcp_controller_spec.rb
+++ b/spec/controllers/projects/clusters/gcp_controller_spec.rb
@@ -143,9 +143,9 @@ describe Projects::Clusters::GcpController do
expect(ClusterProvisionWorker).to receive(:perform_async)
expect { go }.to change { Clusters::Cluster.count }
.and change { Clusters::Providers::Gcp.count }
- expect(response).to redirect_to(project_cluster_path(project, project.cluster))
- expect(project.cluster).to be_gcp
- expect(project.cluster).to be_kubernetes
+ expect(response).to redirect_to(project_cluster_path(project, project.clusters.first))
+ expect(project.clusters.first).to be_gcp
+ expect(project.clusters.first).to be_kubernetes
end
end
end
diff --git a/spec/controllers/projects/clusters/user_controller_spec.rb b/spec/controllers/projects/clusters/user_controller_spec.rb
index 22005e0dc66..913976d187f 100644
--- a/spec/controllers/projects/clusters/user_controller_spec.rb
+++ b/spec/controllers/projects/clusters/user_controller_spec.rb
@@ -64,7 +64,9 @@ describe Projects::Clusters::UserController do
expect(ClusterProvisionWorker).to receive(:perform_async)
expect { go }.to change { Clusters::Cluster.count }
.and change { Clusters::Platforms::Kubernetes.count }
- expect(response).to redirect_to(project_cluster_path(project, project.cluster))
+ expect(response).to redirect_to(project_cluster_path(project, project.clusters.first))
+ expect(project.clusters.first).to be_user
+ expect(project.clusters.first).to be_kubernetes
end
end
end