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
67f25c62
Commit
67f25c62
authored
May 03, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style improvements to spec/models/project_spec.rb
parent
a6c9db61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
spec/models/project_spec.rb
spec/models/project_spec.rb
+13
-2
No files found.
spec/models/project_spec.rb
View file @
67f25c62
...
...
@@ -1138,7 +1138,7 @@ describe Project do
end
end
describe
'#any_runners'
do
describe
'#any_runners
?
'
do
context
'shared runners'
do
let
(
:project
)
{
create
:project
,
shared_runners_enabled:
shared_runners_enabled
}
let
(
:specific_runner
)
{
create
:ci_runner
}
...
...
@@ -1153,21 +1153,25 @@ describe Project do
it
'has a specific runner'
do
project
.
runners
<<
specific_runner
expect
(
project
.
any_runners?
).
to
be_truthy
end
it
'has a shared runner, but they are prohibited to use'
do
shared_runner
expect
(
project
.
any_runners?
).
to
be_falsey
end
it
'checks the presence of specific runner'
do
project
.
runners
<<
specific_runner
expect
(
project
.
any_runners?
{
|
runner
|
runner
==
specific_runner
}).
to
be_truthy
end
it
'returns false if match cannot be found'
do
project
.
runners
<<
specific_runner
expect
(
project
.
any_runners?
{
false
}).
to
be_falsey
end
end
...
...
@@ -1177,16 +1181,19 @@ describe Project do
it
'has a shared runner'
do
shared_runner
expect
(
project
.
any_runners?
).
to
be_truthy
end
it
'checks the presence of shared runner'
do
shared_runner
expect
(
project
.
any_runners?
{
|
runner
|
runner
==
shared_runner
}).
to
be_truthy
end
it
'returns false if match cannot be found'
do
shared_runner
expect
(
project
.
any_runners?
{
false
}).
to
be_falsey
end
end
...
...
@@ -1206,6 +1213,7 @@ describe Project do
it
'has a group runner, but they are prohibited to use'
do
group_runner
expect
(
project
.
any_runners?
).
to
be_falsey
end
end
...
...
@@ -1215,16 +1223,19 @@ describe Project do
it
'has a group runner'
do
group_runner
expect
(
project
.
any_runners?
).
to
be_truthy
end
it
'checks the presence of group runner'
do
group_runner
expect
(
project
.
any_runners?
{
|
runner
|
runner
==
group_runner
}).
to
be_truthy
end
it
'returns false if match cannot be found'
do
group_runner
expect
(
project
.
any_runners?
{
false
}).
to
be_falsey
end
end
...
...
@@ -3592,7 +3603,7 @@ describe Project do
describe
'#toggle_ci_cd_settings!'
do
it
'toggles the value on #settings'
do
project
=
create
:project
,
group_runners_enabled:
false
project
=
create
(
:project
,
group_runners_enabled:
false
)
expect
(
project
.
group_runners_enabled
).
to
be
false
...
...
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