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
db9dd066
Commit
db9dd066
authored
Apr 19, 2017
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add failing test for #31012
parent
a9da3743
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+13
-0
No files found.
spec/requests/api/projects_spec.rb
View file @
db9dd066
...
...
@@ -24,6 +24,7 @@ describe API::Projects, :api do
namespace:
user
.
namespace
,
merge_requests_enabled:
false
,
issues_enabled:
false
,
wiki_enabled:
false
,
builds_enabled:
false
,
snippets_enabled:
false
)
end
let
(
:project_member3
)
do
...
...
@@ -342,6 +343,7 @@ describe API::Projects, :api do
project
=
attributes_for
(
:project
,
{
path:
'camelCasePath'
,
issues_enabled:
false
,
jobs_enabled:
false
,
merge_requests_enabled:
false
,
wiki_enabled:
false
,
only_allow_merge_if_pipeline_succeeds:
false
,
...
...
@@ -351,6 +353,8 @@ describe API::Projects, :api do
post
api
(
'/projects'
,
user
),
project
expect
(
response
).
to
have_http_status
(
201
)
project
.
each_pair
do
|
k
,
v
|
next
if
%i[has_external_issue_tracker issues_enabled merge_requests_enabled wiki_enabled]
.
include?
(
k
)
expect
(
json_response
[
k
.
to_s
]).
to
eq
(
v
)
...
...
@@ -1145,6 +1149,15 @@ describe API::Projects, :api do
expect
(
json_response
[
k
.
to_s
]).
to
eq
(
v
)
end
end
it
'updates jobs_enabled'
do
project_param
=
{
jobs_enabled:
true
}
put
api
(
"/projects/
#{
project3
.
id
}
"
,
user
),
project_param
expect
(
response
).
to
have_http_status
(
200
)
project_param
.
each_pair
do
|
k
,
v
|
expect
(
json_response
[
k
.
to_s
]).
to
eq
(
v
)
end
end
end
context
'when authenticated as project master'
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