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
7a33aaf0
Commit
7a33aaf0
authored
Jan 27, 2017
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use VisibilityLevel constants in spec
parent
c6ad83ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
projects_spec.rb
spec/requests/api/projects_spec.rb
+4
-4
No files found.
spec/requests/api/projects_spec.rb
View file @
7a33aaf0
...
...
@@ -822,7 +822,7 @@ describe API::Projects, api: true do
it
'creates a new project snippet'
do
post
api
(
"/projects/
#{
project
.
id
}
/snippets"
,
user
),
title:
'api test'
,
file_name:
'sample.rb'
,
code:
'test'
,
visibility_level:
'0'
visibility_level:
Gitlab
::
VisibilityLevel
::
PRIVATE
expect
(
response
).
to
have_http_status
(
201
)
expect
(
json_response
[
'title'
]).
to
eq
(
'api test'
)
end
...
...
@@ -1071,7 +1071,7 @@ describe API::Projects, api: true do
end
it
'updates visibility_level'
do
project_param
=
{
visibility_level:
20
}
project_param
=
{
visibility_level:
Gitlab
::
VisibilityLevel
::
PUBLIC
}
put
api
(
"/projects/
#{
project3
.
id
}
"
,
user
),
project_param
expect
(
response
).
to
have_http_status
(
200
)
project_param
.
each_pair
do
|
k
,
v
|
...
...
@@ -1081,7 +1081,7 @@ describe API::Projects, api: true do
it
'updates visibility_level from public to private'
do
project3
.
update_attributes
({
visibility_level:
Gitlab
::
VisibilityLevel
::
PUBLIC
})
project_param
=
{
visibility_level:
0
}
project_param
=
{
visibility_level:
Gitlab
::
VisibilityLevel
::
PRIVATE
}
put
api
(
"/projects/
#{
project3
.
id
}
"
,
user
),
project_param
expect
(
response
).
to
have_http_status
(
200
)
project_param
.
each_pair
do
|
k
,
v
|
...
...
@@ -1154,7 +1154,7 @@ describe API::Projects, api: true do
end
it
'does not update visibility_level'
do
project_param
=
{
visibility_level:
20
}
project_param
=
{
visibility_level:
Gitlab
::
VisibilityLevel
::
PUBLIC
}
put
api
(
"/projects/
#{
project3
.
id
}
"
,
user4
),
project_param
expect
(
response
).
to
have_http_status
(
403
)
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