summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-05-02 20:44:17 +0200
committerMatija Čupić <matteeyah@gmail.com>2018-05-02 20:44:17 +0200
commita5f43b3d0a6ece692123e3521e8e159dd77bb346 (patch)
tree6544dbbcb2623ff55defc9b6fe44161a721f586e
parenta1e1bbef7a809908deb551ba861251bb4ecd8c47 (diff)
downloadgitlab-ce-a5f43b3d0a6ece692123e3521e8e159dd77bb346.tar.gz
Remove project billing context from controller spec
-rw-r--r--spec/controllers/projects/clusters/gcp_controller_spec.rb22
1 files changed, 7 insertions, 15 deletions
diff --git a/spec/controllers/projects/clusters/gcp_controller_spec.rb b/spec/controllers/projects/clusters/gcp_controller_spec.rb
index 10ca2af1995..271ba37aed4 100644
--- a/spec/controllers/projects/clusters/gcp_controller_spec.rb
+++ b/spec/controllers/projects/clusters/gcp_controller_spec.rb
@@ -137,21 +137,13 @@ describe Projects::Clusters::GcpController do
stub_google_api_validate_token
end
- context 'when google project billing is enabled' do
- before do
- redis_double = double.as_null_object
- allow(Gitlab::Redis::SharedState).to receive(:with).and_yield(redis_double)
- allow(redis_double).to receive(:get).with(CheckGcpProjectBillingWorker.redis_shared_state_key_for('token')).and_return('true')
- end
-
- 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
+ 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