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
77456854
Commit
77456854
authored
Feb 19, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added specs for Geo Refresh Projects API endpoint
parent
fde54e2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
spec/requests/api/geo_spec.rb
spec/requests/api/geo_spec.rb
+21
-0
No files found.
spec/requests/api/geo_spec.rb
0 → 100644
View file @
77456854
require
'spec_helper'
describe
API
::
API
,
api:
true
do
include
ApiHelpers
let
(
:admin
)
{
create
(
:admin
)
}
let
(
:user
)
{
create
(
:user
)
}
describe
'POST /geo/refresh_projects'
do
before
(
:each
)
{
allow_any_instance_of
(
::
Geo
::
ScheduleRepoUpdateService
).
to
receive
(
:execute
)
}
it
'should retrieve the license information if admin is logged in'
do
post
api
(
'/geo/refresh_projects'
,
admin
),
projects:
[
'1'
,
'2'
,
'3'
]
expect
(
response
.
status
).
to
eq
201
end
it
'should deny access if not admin'
do
post
api
(
'/geo/refresh_projects'
,
user
)
expect
(
response
.
status
).
to
eq
403
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