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
Boxiang Sun
gitlab-ce
Commits
65caacc6
Commit
65caacc6
authored
Jun 11, 2018
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix and add missing api specs
parent
a30e266e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
spec/requests/api/runners_spec.rb
spec/requests/api/runners_spec.rb
+17
-1
No files found.
spec/requests/api/runners_spec.rb
View file @
65caacc6
...
...
@@ -112,7 +112,7 @@ describe API::Runners do
end
it
'avoids filtering if scope is invalid'
do
get
api
(
'/runners?scope=unknown'
,
admin
)
get
api
(
'/runners
/all
?scope=unknown'
,
admin
)
expect
(
response
).
to
have_gitlab_http_status
(
400
)
end
end
...
...
@@ -587,6 +587,22 @@ describe API::Runners do
expect
(
json_response
[
0
]).
to
have_key
(
'ip_address'
)
expect
(
shared
).
to
be_truthy
end
it
'filters runners by scope'
do
get
api
(
"/projects/
#{
project
.
id
}
/runners?scope=specific"
,
user
)
shared
=
json_response
.
any?
{
|
r
|
r
[
'is_shared'
]
}
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
include_pagination_headers
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
[
0
]).
to
have_key
(
'ip_address'
)
expect
(
shared
).
to
be_falsey
end
it
'avoids filtering if scope is invalid'
do
get
api
(
"/projects/
#{
project
.
id
}
/runners?scope=unknown"
,
user
)
expect
(
response
).
to
have_gitlab_http_status
(
400
)
end
end
context
'authorized user without maintainer privileges'
do
...
...
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