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

Remove references of project.cluster from specs

parent a42b43ce
......@@ -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
......
......@@ -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
......
......@@ -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)
......
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