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
90c09efe
Commit
90c09efe
authored
Dec 03, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rubocop
parent
40f1859d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
13 deletions
+12
-13
spec/controllers/projects/clusters/gcp_controller_spec.rb
spec/controllers/projects/clusters/gcp_controller_spec.rb
+4
-4
spec/controllers/projects/clusters/user_controller_spec.rb
spec/controllers/projects/clusters/user_controller_spec.rb
+1
-1
spec/controllers/projects/clusters_controller_spec.rb
spec/controllers/projects/clusters_controller_spec.rb
+4
-5
spec/features/projects/clusters/applications_spec.rb
spec/features/projects/clusters/applications_spec.rb
+3
-3
No files found.
spec/controllers/projects/clusters/gcp_controller_spec.rb
View file @
90c09efe
...
@@ -89,11 +89,11 @@ describe Projects::Clusters::GcpController do
...
@@ -89,11 +89,11 @@ describe Projects::Clusters::GcpController do
stub_google_api_expired_token
stub_google_api_expired_token
end
end
it
{
expect
(
go
).
to
redirect_to
(
gcp_login_
namespace_project_clusters_path
(
project
.
namespace
,
project
))
}
it
{
expect
(
go
).
to
redirect_to
(
gcp_login_
project_clusters_path
(
project
))
}
end
end
context
'when access token is not stored in session'
do
context
'when access token is not stored in session'
do
it
{
expect
(
go
).
to
redirect_to
(
gcp_login_
namespace_project_clusters_path
(
project
.
namespace
,
project
))
}
it
{
expect
(
go
).
to
redirect_to
(
gcp_login_
project_clusters_path
(
project
))
}
end
end
end
end
...
@@ -156,13 +156,13 @@ describe Projects::Clusters::GcpController do
...
@@ -156,13 +156,13 @@ describe Projects::Clusters::GcpController do
end
end
it
'redirects to login page'
do
it
'redirects to login page'
do
expect
(
go
).
to
redirect_to
(
gcp_login_
namespace_project_clusters_path
(
project
.
namespace
,
project
))
expect
(
go
).
to
redirect_to
(
gcp_login_
project_clusters_path
(
project
))
end
end
end
end
context
'when access token is not stored in session'
do
context
'when access token is not stored in session'
do
it
'redirects to login page'
do
it
'redirects to login page'
do
expect
(
go
).
to
redirect_to
(
gcp_login_
namespace_project_clusters_path
(
project
.
namespace
,
project
))
expect
(
go
).
to
redirect_to
(
gcp_login_
project_clusters_path
(
project
))
end
end
end
end
end
end
...
...
spec/controllers/projects/clusters/user_controller_spec.rb
View file @
90c09efe
...
@@ -58,7 +58,7 @@ describe Projects::Clusters::UserController do
...
@@ -58,7 +58,7 @@ describe Projects::Clusters::UserController do
project
.
add_master
(
user
)
project
.
add_master
(
user
)
sign_in
(
user
)
sign_in
(
user
)
end
end
context
'when creates a cluster'
do
context
'when creates a cluster'
do
it
'creates a new cluster'
do
it
'creates a new cluster'
do
expect
(
ClusterProvisionWorker
).
to
receive
(
:perform_async
)
expect
(
ClusterProvisionWorker
).
to
receive
(
:perform_async
)
...
...
spec/controllers/projects/clusters_controller_spec.rb
View file @
90c09efe
...
@@ -177,7 +177,7 @@ describe Projects::ClustersController do
...
@@ -177,7 +177,7 @@ describe Projects::ClustersController do
context
'when changing parameters'
do
context
'when changing parameters'
do
let
(
:params
)
do
let
(
:params
)
do
{
{
cluster:
{
cluster:
{
enabled:
false
,
enabled:
false
,
name:
'my-new-cluster-name'
,
name:
'my-new-cluster-name'
,
platform_kubernetes_attributes:
{
platform_kubernetes_attributes:
{
...
@@ -230,10 +230,9 @@ describe Projects::ClustersController do
...
@@ -230,10 +230,9 @@ describe Projects::ClustersController do
end
end
def
go
def
go
put
:update
,
params
.
merge
(
put
:update
,
params
.
merge
(
namespace_id:
project
.
namespace
,
namespace_id:
project
.
namespace
,
project_id:
project
,
project_id:
project
,
id:
cluster
)
id:
cluster
)
end
end
end
end
...
...
spec/features/projects/clusters/applications_spec.rb
View file @
90c09efe
...
@@ -18,7 +18,7 @@ feature 'Clusters Applications', :js do
...
@@ -18,7 +18,7 @@ feature 'Clusters Applications', :js do
context
'when cluster is being created'
do
context
'when cluster is being created'
do
let
(
:cluster
)
{
create
(
:cluster
,
:providing_by_gcp
,
projects:
[
project
])}
let
(
:cluster
)
{
create
(
:cluster
,
:providing_by_gcp
,
projects:
[
project
])}
scenario
'user is unable to install applications'
do
scenario
'user is unable to install applications'
do
page
.
within
(
'.js-cluster-application-row-helm'
)
do
page
.
within
(
'.js-cluster-application-row-helm'
)
do
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
eq
(
'true'
)
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
eq
(
'true'
)
...
@@ -29,7 +29,7 @@ feature 'Clusters Applications', :js do
...
@@ -29,7 +29,7 @@ feature 'Clusters Applications', :js do
context
'when cluster is created'
do
context
'when cluster is created'
do
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
projects:
[
project
])}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
projects:
[
project
])}
scenario
'user can install applications'
do
scenario
'user can install applications'
do
page
.
within
(
'.js-cluster-application-row-helm'
)
do
page
.
within
(
'.js-cluster-application-row-helm'
)
do
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
be_nil
expect
(
page
.
find
(
:css
,
'.js-cluster-application-install-button'
)[
'disabled'
]).
to
be_nil
...
@@ -40,7 +40,7 @@ feature 'Clusters Applications', :js do
...
@@ -40,7 +40,7 @@ feature 'Clusters Applications', :js do
context
'when user installs Helm'
do
context
'when user installs Helm'
do
before
do
before
do
allow
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
).
and_return
(
nil
)
allow
(
ClusterInstallAppWorker
).
to
receive
(
:perform_async
).
and_return
(
nil
)
page
.
within
(
'.js-cluster-application-row-helm'
)
do
page
.
within
(
'.js-cluster-application-row-helm'
)
do
page
.
find
(
:css
,
'.js-cluster-application-install-button'
).
click
page
.
find
(
:css
,
'.js-cluster-application-install-button'
).
click
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