Remove references of project.cluster from specs

This commit is contained in:
Matija Čupić 2017-12-04 17:02:18 +01:00
parent a42b43ce7a
commit f1357a1e15
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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
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

View File

@ -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
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)