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
38759832
Commit
38759832
authored
Aug 28, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Impprove spec by godfat suggestions
parent
4b0e31ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
runners.rb
spec/factories/ci/runners.rb
+2
-2
seed_spec.rb
spec/lib/gitlab/ci/stage/seed_spec.rb
+10
-1
runners_spec.rb
spec/requests/api/runners_spec.rb
+1
-1
No files found.
spec/factories/ci/runners.rb
View file @
38759832
...
...
@@ -23,11 +23,11 @@ FactoryGirl.define do
end
trait
:protected
do
access_level
Ci
::
Runner
.
access_levels
[
'protected_'
]
access_level
'protected_'
end
trait
:unprotected
do
access_level
Ci
::
Runner
.
access_levels
[
'unprotected'
]
access_level
'unprotected'
end
end
end
spec/lib/gitlab/ci/stage/seed_spec.rb
View file @
38759832
...
...
@@ -26,7 +26,16 @@ describe Gitlab::Ci::Stage::Seed do
expect
(
subject
.
builds
).
to
all
(
include
(
project:
pipeline
.
project
))
expect
(
subject
.
builds
)
.
to
all
(
include
(
trigger_request:
pipeline
.
trigger_requests
.
first
))
expect
(
subject
.
builds
).
to
all
(
include
(
protected:
true
))
end
context
'when a ref is protected'
do
before
do
allow_any_instance_of
(
Project
).
to
receive
(
:protected_for?
).
and_return
(
true
)
end
it
'returns unprotected builds'
do
expect
(
subject
.
builds
).
to
all
(
include
(
protected:
true
))
end
end
context
'when a ref is unprotected'
do
...
...
spec/requests/api/runners_spec.rb
View file @
38759832
...
...
@@ -192,7 +192,7 @@ describe API::Runners do
tag_list:
[
'ruby2.1'
,
'pgsql'
,
'mysql'
],
run_untagged:
'false'
,
locked:
'true'
,
access_level:
1
)
access_level:
Ci
::
Runner
.
access_levels
[
'protected_'
]
)
shared_runner
.
reload
expect
(
response
).
to
have_http_status
(
200
)
...
...
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