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

Remove project billing context from controller spec

parent a1e1bbef
...@@ -137,21 +137,13 @@ describe Projects::Clusters::GcpController do ...@@ -137,21 +137,13 @@ describe Projects::Clusters::GcpController do
stub_google_api_validate_token stub_google_api_validate_token
end end
context 'when google project billing is enabled' do it 'creates a new cluster' do
before do expect(ClusterProvisionWorker).to receive(:perform_async)
redis_double = double.as_null_object expect { go }.to change { Clusters::Cluster.count }
allow(Gitlab::Redis::SharedState).to receive(:with).and_yield(redis_double) .and change { Clusters::Providers::Gcp.count }
allow(redis_double).to receive(:get).with(CheckGcpProjectBillingWorker.redis_shared_state_key_for('token')).and_return('true') expect(response).to redirect_to(project_cluster_path(project, project.clusters.first))
end expect(project.clusters.first).to be_gcp
expect(project.clusters.first).to be_kubernetes
it 'creates a new cluster' 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.clusters.first))
expect(project.clusters.first).to be_gcp
expect(project.clusters.first).to be_kubernetes
end
end end
end end
......
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