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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
4c2a33ce
Commit
4c2a33ce
authored
Dec 17, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clusters_controller_spec
parent
37ca748c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
spec/controllers/projects/clusters_controller_spec.rb
spec/controllers/projects/clusters_controller_spec.rb
+4
-3
No files found.
spec/controllers/projects/clusters_controller_spec.rb
View file @
4c2a33ce
...
...
@@ -18,7 +18,7 @@ describe Projects::ClustersController do
context
'when project has one or more clusters'
do
let
(
:project
)
{
create
(
:project
)
}
let!
(
:enabled_cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
projects:
[
project
])
}
let!
(
:disabled_cluster
)
{
create
(
:cluster
,
:disabled
,
:provided_by_gcp
,
projects:
[
project
])
}
let!
(
:disabled_cluster
)
{
create
(
:cluster
,
:disabled
,
:provided_by_gcp
,
environment_scope:
'prod/*'
,
projects:
[
project
])
}
it
'lists available clusters'
do
go
...
...
@@ -32,7 +32,8 @@ describe Projects::ClustersController do
before
do
allow
(
Clusters
::
Cluster
).
to
receive
(
:paginates_per
).
and_return
(
1
)
create_list
(
:cluster
,
2
,
:provided_by_gcp
,
projects:
[
project
])
create
(
:cluster
,
:provided_by_gcp
,
environment_scope:
'staging/*'
,
projects:
[
project
])
create
(
:cluster
,
:provided_by_gcp
,
environment_scope:
'review/*'
,
projects:
[
project
])
get
:index
,
namespace_id:
project
.
namespace
,
project_id:
project
,
page:
last_page
end
...
...
@@ -370,7 +371,7 @@ describe Projects::ClustersController do
end
describe
'security'
do
s
et
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
projects:
[
project
])
}
l
et
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
projects:
[
project
])
}
it
{
expect
{
go
}.
to
be_allowed_for
(
:admin
)
}
it
{
expect
{
go
}.
to
be_allowed_for
(
:owner
).
of
(
project
)
}
...
...
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