diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-12-04 19:02:18 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-12-04 19:02:18 +0300 |
commit | f1357a1e15bead6b58c049357c765dd991c04d9b (patch) | |
tree | 709346bc20234117281b74ff4cd67390ba9ad737 | |
parent | a42b43ce7a9146ac1035328f2bc1cfc5f06e9371 (diff) |
Remove references of project.cluster from specs
3 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb index 2843045fdc4..789a6254e2d 100644 --- a/app/controllers/projects/clusters_controller.rb +++ b/app/controllers/projects/clusters_controller.rb @@ -75,7 +75,7 @@ class Projects::ClustersController < Projects::ApplicationController end format.html do flash[:notice] = "Cluster was successfully updated." - redirect_to project_cluster_path(project, project.cluster) + redirect_to project_cluster_path(project, cluster) end end else diff --git a/spec/controllers/projects/clusters_controller_spec.rb b/spec/controllers/projects/clusters_controller_spec.rb index 6ff52aff35a..1e546a66886 100644 --- a/spec/controllers/projects/clusters_controller_spec.rb +++ b/spec/controllers/projects/clusters_controller_spec.rb @@ -255,7 +255,7 @@ describe Projects::ClustersController do it 'creates a new cluster' do expect(ClusterProvisionWorker).to receive(:perform_async) expect { go }.to change { Clusters::Cluster.count } - expect(response).to redirect_to(project_cluster_path(project, project.cluster)) + expect(response).to redirect_to(project_cluster_path(project, project.clusters.last)) end end end @@ -422,7 +422,7 @@ describe Projects::ClustersController do go cluster.reload - expect(response).to redirect_to(project_cluster_path(project, project.cluster)) + expect(response).to redirect_to(project_cluster_path(project, cluster)) expect(flash[:notice]).to eq('Cluster was successfully updated.') expect(cluster.enabled).to be_falsey end diff --git a/spec/migrations/migrate_gcp_clusters_to_new_clusters_architectures_spec.rb b/spec/migrations/migrate_gcp_clusters_to_new_clusters_architectures_spec.rb index 9f41534441b..05f281fffff 100644 --- a/spec/migrations/migrate_gcp_clusters_to_new_clusters_architectures_spec.rb +++ b/spec/migrations/migrate_gcp_clusters_to_new_clusters_architectures_spec.rb @@ -57,7 +57,7 @@ describe MigrateGcpClustersToNewClustersArchitectures, :migration do expect(cluster.platform_type).to eq('kubernetes') expect(cluster.project).to eq(project) - expect(project.cluster).to eq(cluster) + expect(project.clusters).to include(cluster) expect(cluster.provider_gcp.cluster).to eq(cluster) expect(cluster.provider_gcp.status).to eq(status) @@ -134,7 +134,7 @@ describe MigrateGcpClustersToNewClustersArchitectures, :migration do expect(cluster.platform_type).to eq('kubernetes') expect(cluster.project).to eq(project) - expect(project.cluster).to eq(cluster) + expect(project.clusters).to include(cluster) expect(cluster.provider_gcp.cluster).to eq(cluster) expect(cluster.provider_gcp.status).to eq(status) |