BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
54831bd4
Commit
54831bd4
authored
Oct 04, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated messages and notices
parent
f16ac0ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
33 deletions
+4
-33
clusters_controller.rb
app/controllers/projects/clusters_controller.rb
+3
-3
cluster.rb
app/models/gcp/cluster.rb
+0
-4
cluster_spec.rb
spec/models/gcp/cluster_spec.rb
+0
-26
project_spec.rb
spec/models/project_spec.rb
+1
-0
No files found.
app/controllers/projects/clusters_controller.rb
View file @
54831bd4
...
...
@@ -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
...
...
@@ -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
...
...
app/models/gcp/cluster.rb
View file @
54831bd4
...
...
@@ -110,9 +110,5 @@ module Gcp
true
end
def
destroy
super
if
restrict_modification
end
end
end
spec/models/gcp/cluster_spec.rb
View file @
54831bd4
...
...
@@ -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
spec/models/project_spec.rb
View file @
54831bd4
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment