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
419f39e3
Commit
419f39e3
authored
Apr 27, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dz-fix-v3-api-deployments-spec' into 'master'
Make api/v3/deployments_spec to actually tests v3 instead of current API See merge request !10965
parents
00e4ec55
22ed9c02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
deployments_spec.rb
spec/requests/api/v3/deployments_spec.rb
+6
-6
No files found.
spec/requests/api/v3/deployments_spec.rb
View file @
419f39e3
require
'spec_helper'
require
'spec_helper'
describe
API
::
Deployments
do
describe
API
::
V3
::
Deployments
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:non_member
)
{
create
(
:user
)
}
let
(
:non_member
)
{
create
(
:user
)
}
let
(
:project
)
{
deployment
.
environment
.
project
}
let
(
:project
)
{
deployment
.
environment
.
project
}
...
@@ -24,11 +24,11 @@ describe API::Deployments do
...
@@ -24,11 +24,11 @@ describe API::Deployments do
describe
'GET /projects/:id/deployments'
do
describe
'GET /projects/:id/deployments'
do
context
'as member of the project'
do
context
'as member of the project'
do
it_behaves_like
'a paginated resources'
do
it_behaves_like
'a paginated resources'
do
let
(
:request
)
{
get
api
(
"/projects/
#{
project
.
id
}
/deployments"
,
user
)
}
let
(
:request
)
{
get
v3_
api
(
"/projects/
#{
project
.
id
}
/deployments"
,
user
)
}
end
end
it
'returns projects deployments'
do
it
'returns projects deployments'
do
get
api
(
"/projects/
#{
project
.
id
}
/deployments"
,
user
)
get
v3_
api
(
"/projects/
#{
project
.
id
}
/deployments"
,
user
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
).
to
be_an
Array
...
@@ -40,7 +40,7 @@ describe API::Deployments do
...
@@ -40,7 +40,7 @@ describe API::Deployments do
context
'as non member'
do
context
'as non member'
do
it
'returns a 404 status code'
do
it
'returns a 404 status code'
do
get
api
(
"/projects/
#{
project
.
id
}
/deployments"
,
non_member
)
get
v3_
api
(
"/projects/
#{
project
.
id
}
/deployments"
,
non_member
)
expect
(
response
).
to
have_http_status
(
404
)
expect
(
response
).
to
have_http_status
(
404
)
end
end
...
@@ -50,7 +50,7 @@ describe API::Deployments do
...
@@ -50,7 +50,7 @@ describe API::Deployments do
describe
'GET /projects/:id/deployments/:deployment_id'
do
describe
'GET /projects/:id/deployments/:deployment_id'
do
context
'as a member of the project'
do
context
'as a member of the project'
do
it
'returns the projects deployment'
do
it
'returns the projects deployment'
do
get
api
(
"/projects/
#{
project
.
id
}
/deployments/
#{
deployment
.
id
}
"
,
user
)
get
v3_
api
(
"/projects/
#{
project
.
id
}
/deployments/
#{
deployment
.
id
}
"
,
user
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
'sha'
]).
to
match
/\A\h{40}\z/
expect
(
json_response
[
'sha'
]).
to
match
/\A\h{40}\z/
...
@@ -60,7 +60,7 @@ describe API::Deployments do
...
@@ -60,7 +60,7 @@ describe API::Deployments do
context
'as non member'
do
context
'as non member'
do
it
'returns a 404 status code'
do
it
'returns a 404 status code'
do
get
api
(
"/projects/
#{
project
.
id
}
/deployments/
#{
deployment
.
id
}
"
,
non_member
)
get
v3_
api
(
"/projects/
#{
project
.
id
}
/deployments/
#{
deployment
.
id
}
"
,
non_member
)
expect
(
response
).
to
have_http_status
(
404
)
expect
(
response
).
to
have_http_status
(
404
)
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