Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
5ea53d2e
Commit
5ea53d2e
authored
Dec 03, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
23536559
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
spec/controllers/projects/clusters_controller_spec.rb
spec/controllers/projects/clusters_controller_spec.rb
+7
-7
No files found.
spec/controllers/projects/clusters_controller_spec.rb
View file @
5ea53d2e
...
...
@@ -18,11 +18,11 @@ describe Projects::ClustersController do
context
'when project has a cluster'
do
let!
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
projects:
[
project
])
}
it
{
expect
(
go
).
to
redirect_to
(
project_cluster_path
(
project
,
project
.
cluster
))
}
it
{
expect
(
go
).
to
redirect_to
(
namespace_project_cluster_path
(
project
.
namespace
,
project
,
project
.
cluster
))
}
end
context
'when project does not have a cluster'
do
it
{
expect
(
go
).
to
redirect_to
(
new_
project_cluster_path
(
project
))
}
it
{
expect
(
go
).
to
redirect_to
(
new_
namespace_project_cluster_path
(
project
.
namespace
,
project
))
}
end
end
...
...
@@ -146,7 +146,7 @@ describe Projects::ClustersController do
go
cluster
.
reload
expect
(
response
).
to
redirect_to
(
project_cluster_path
(
project
,
project
.
cluster
))
expect
(
response
).
to
redirect_to
(
namespace_project_cluster_path
(
project
.
namespace
,
project
,
project
.
cluster
))
expect
(
flash
[
:notice
]).
to
eq
(
'Cluster was successfully updated.'
)
expect
(
cluster
.
enabled
).
to
be_falsey
end
...
...
@@ -197,7 +197,7 @@ describe Projects::ClustersController do
go
cluster
.
reload
expect
(
response
).
to
redirect_to
(
project_cluster_path
(
project
,
project
.
cluster
))
expect
(
response
).
to
redirect_to
(
namespace_project_cluster_path
(
project
.
namespace
,
project
,
project
.
cluster
))
expect
(
flash
[
:notice
]).
to
eq
(
'Cluster was successfully updated.'
)
expect
(
cluster
.
enabled
).
to
be_falsey
expect
(
cluster
.
name
).
to
eq
(
'my-new-cluster-name'
)
...
...
@@ -261,7 +261,7 @@ describe Projects::ClustersController do
.
and
change
{
Clusters
::
Platforms
::
Kubernetes
.
count
}.
by
(
-
1
)
.
and
change
{
Clusters
::
Providers
::
Gcp
.
count
}.
by
(
-
1
)
expect
(
response
).
to
redirect_to
(
project_clusters_path
(
project
))
expect
(
response
).
to
redirect_to
(
namespace_project_clusters_path
(
project
.
namespace
,
project
))
expect
(
flash
[
:notice
]).
to
eq
(
'Cluster integration was successfully removed.'
)
end
end
...
...
@@ -274,7 +274,7 @@ describe Projects::ClustersController do
.
to
change
{
Clusters
::
Cluster
.
count
}.
by
(
-
1
)
.
and
change
{
Clusters
::
Providers
::
Gcp
.
count
}.
by
(
-
1
)
expect
(
response
).
to
redirect_to
(
project_clusters_path
(
project
))
expect
(
response
).
to
redirect_to
(
namespace_project_clusters_path
(
project
.
namespace
,
project
))
expect
(
flash
[
:notice
]).
to
eq
(
'Cluster integration was successfully removed.'
)
end
end
...
...
@@ -290,7 +290,7 @@ describe Projects::ClustersController do
.
and
change
{
Clusters
::
Platforms
::
Kubernetes
.
count
}.
by
(
-
1
)
.
and
change
{
Clusters
::
Providers
::
Gcp
.
count
}.
by
(
0
)
expect
(
response
).
to
redirect_to
(
project_clusters_path
(
project
))
expect
(
response
).
to
redirect_to
(
namespace_project_clusters_path
(
project
.
namespace
,
project
))
expect
(
flash
[
:notice
]).
to
eq
(
'Cluster integration was successfully removed.'
)
end
end
...
...
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