diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-22 22:36:46 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-22 22:59:04 +0100 |
commit | 7c5968788c163d6bfa6148d760a1b2ef48a3f4e4 (patch) | |
tree | c6d5fb1da9949384184d242f0dbfa1df579cb761 | |
parent | f330f6596094751ec03dbde4eb8389d0281acaae (diff) | |
download | gitlab-ce-7c5968788c163d6bfa6148d760a1b2ef48a3f4e4.tar.gz |
Do not persist Google Project Billing Failure errors after a reload
-rw-r--r-- | app/controllers/projects/clusters/gcp_controller.rb | 4 | ||||
-rw-r--r-- | spec/controllers/projects/clusters/gcp_controller_spec.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/clusters/gcp_controller.rb b/app/controllers/projects/clusters/gcp_controller.rb index 0f41af7d87b..6b0b22f8e73 100644 --- a/app/controllers/projects/clusters/gcp_controller.rb +++ b/app/controllers/projects/clusters/gcp_controller.rb @@ -40,9 +40,9 @@ class Projects::Clusters::GcpController < Projects::ApplicationController def verify_billing case google_project_billing_status when nil - flash[:alert] = _('We could not verify that one of your projects on GCP has billing enabled. Please try again.') + flash.now[:alert] = _('We could not verify that one of your projects on GCP has billing enabled. Please try again.') when false - flash[:alert] = _('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a Kubernetes cluster</a>, then try again.').html_safe % { link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral" } + flash.now[:alert] = _('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a Kubernetes cluster</a>, then try again.').html_safe % { link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral" } when true return end diff --git a/spec/controllers/projects/clusters/gcp_controller_spec.rb b/spec/controllers/projects/clusters/gcp_controller_spec.rb index 775f9db1c6e..e14ba29fa70 100644 --- a/spec/controllers/projects/clusters/gcp_controller_spec.rb +++ b/spec/controllers/projects/clusters/gcp_controller_spec.rb @@ -161,7 +161,7 @@ describe Projects::Clusters::GcpController do it 'renders the cluster form with an error' do go - expect(response).to set_flash[:alert] + expect(response).to set_flash.now[:alert] expect(response).to render_template('new') end end |