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
d1ba15c7
Unverified
Commit
d1ba15c7
authored
Nov 27, 2017
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for ClustersFinder
parent
554bf24b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
clusters_finder_spec.rb
spec/finders/clusters_finder_spec.rb
+33
-0
No files found.
spec/finders/clusters_finder_spec.rb
0 → 100644
View file @
d1ba15c7
require
'spec_helper'
describe
ClustersFinder
do
let
(
:project
)
{
create
(
:project
)
}
set
(
:user
)
{
create
(
:user
)
}
describe
'#execute'
do
before
do
create_list
(
:cluster
,
2
,
:provided_by_gcp
,
projects:
[
project
])
project
.
clusters
.
last
.
enabled
=
false
end
subject
{
described_class
.
new
(
project
,
user
,
scope
).
execute
}
context
'when scope is all'
do
let
(
:scope
)
{
:all
}
it
{
is_expected
.
to
eq
(
project
.
clusters
.
to_a
)
}
end
context
'when scope is enabled'
do
let
(
:scope
)
{
:enabled
}
it
{
is_expected
.
to
eq
(
project
.
clusters
.
enabled
.
to_a
)
}
end
context
'when scope is disabled'
do
let
(
:scope
)
{
:disabled
}
it
{
is_expected
.
to
eq
(
project
.
clusters
.
disabled
.
to_a
)
}
end
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