Commit f1357a1e authored by Matija Čupić's avatar Matija Čupić

Remove references of project.cluster from specs

parent a42b43ce
No related merge requests found
...@@ -75,7 +75,7 @@ class Projects::ClustersController < Projects::ApplicationController ...@@ -75,7 +75,7 @@ class Projects::ClustersController < Projects::ApplicationController
end end
format.html do format.html do
flash[:notice] = "Cluster was successfully updated." flash[:notice] = "Cluster was successfully updated."
redirect_to project_cluster_path(project, project.cluster) redirect_to project_cluster_path(project, cluster)
end end
end end
else else
......
...@@ -255,7 +255,7 @@ describe Projects::ClustersController do ...@@ -255,7 +255,7 @@ describe Projects::ClustersController do
it 'creates a new cluster' do it 'creates a new cluster' do
expect(ClusterProvisionWorker).to receive(:perform_async) expect(ClusterProvisionWorker).to receive(:perform_async)
expect { go }.to change { Clusters::Cluster.count } 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 end
end end
...@@ -422,7 +422,7 @@ describe Projects::ClustersController do ...@@ -422,7 +422,7 @@ describe Projects::ClustersController do
go go
cluster.reload 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(flash[:notice]).to eq('Cluster was successfully updated.')
expect(cluster.enabled).to be_falsey expect(cluster.enabled).to be_falsey
end end
......
...@@ -57,7 +57,7 @@ describe MigrateGcpClustersToNewClustersArchitectures, :migration do ...@@ -57,7 +57,7 @@ describe MigrateGcpClustersToNewClustersArchitectures, :migration do
expect(cluster.platform_type).to eq('kubernetes') expect(cluster.platform_type).to eq('kubernetes')
expect(cluster.project).to eq(project) 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.cluster).to eq(cluster)
expect(cluster.provider_gcp.status).to eq(status) expect(cluster.provider_gcp.status).to eq(status)
...@@ -134,7 +134,7 @@ describe MigrateGcpClustersToNewClustersArchitectures, :migration do ...@@ -134,7 +134,7 @@ describe MigrateGcpClustersToNewClustersArchitectures, :migration do
expect(cluster.platform_type).to eq('kubernetes') expect(cluster.platform_type).to eq('kubernetes')
expect(cluster.project).to eq(project) 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.cluster).to eq(cluster)
expect(cluster.provider_gcp.status).to eq(status) expect(cluster.provider_gcp.status).to eq(status)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment