Skip to content
Snippets Groups Projects
Commit 54831bd4 authored by Kamil Trzcińśki's avatar Kamil Trzcińśki
Browse files

Updated messages and notices

parent f16ac0ef
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -61,7 +61,7 @@ class Projects::ClustersController < Projects::ApplicationController
.execute(cluster)
 
if cluster.valid?
flash[:notice] = "Cluster updated"
flash[:notice] = "Cluster was successfully updated."
redirect_to project_cluster_path(project, project.cluster)
else
render :show
Loading
Loading
@@ -70,10 +70,10 @@ class Projects::ClustersController < Projects::ApplicationController
 
def destroy
if cluster.destroy
flash[:notice] = "Cluster removed"
flash[:notice] = "Cluster was successfully removed."
redirect_to project_clusters_path(project), status: 302
else
flash[:notice] = "Cluster removed"
flash[:notice] = "Cluster was not removed."
render :show
end
end
Loading
Loading
Loading
Loading
@@ -110,9 +110,5 @@ module Gcp
 
true
end
def destroy
super if restrict_modification
end
end
end
Loading
Loading
@@ -237,30 +237,4 @@ describe Gcp::Cluster do
end
end
end
describe '#destroy' do
subject { cluster.destroy }
let(:cluster) { create(:gcp_cluster) }
context 'when status is created' do
before do
cluster.make_created!
end
it 'destory the cluster' do
is_expected.to eq(cluster)
end
end
context 'when status is creating' do
before do
cluster.make_creating!
end
it 'does not destory the cluster' do
is_expected.to be_nil
end
end
end
end
Loading
Loading
@@ -76,6 +76,7 @@ describe Project do
it { is_expected.to have_many(:uploads).dependent(:destroy) }
it { is_expected.to have_many(:pipeline_schedules) }
it { is_expected.to have_many(:members_and_requesters) }
it { is_expected.to have_one(:cluster) }
 
context 'after initialized' do
it "has a project_feature" do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment