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
8faf01c0
Commit
8faf01c0
authored
May 09, 2021
by
Alex Kalderimis
Committed by
Alex Kalderimis
May 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add REST specs for clearing assignees
parent
efa43a73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+31
-1
No files found.
spec/requests/api/merge_requests_spec.rb
View file @
8faf01c0
...
...
@@ -2154,7 +2154,7 @@ RSpec.describe API::MergeRequests do
end
end
describe
'PUT /projects/:id/merge_reuests/:merge_request_iid'
do
describe
'PUT /projects/:id/merge_re
q
uests/:merge_request_iid'
do
it_behaves_like
'issuable update endpoint'
do
let
(
:entity
)
{
merge_request
}
end
...
...
@@ -2176,6 +2176,36 @@ RSpec.describe API::MergeRequests do
end
end
context
'when only assignee_ids are provided, and the list is empty'
do
let
(
:params
)
do
{
assignee_ids:
[]
}
end
it
'clears the assignees'
do
put
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
iid
}
"
,
user
),
params:
params
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
json_response
[
'assignees'
]).
to
be_empty
)
end
end
context
'when only assignee_ids are provided, and the list is contains the sentinel value'
do
let
(
:params
)
do
{
assignee_ids:
[
0
]
}
end
it
'clears the assignees'
do
put
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
iid
}
"
,
user
),
params:
params
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
json_response
[
'assignees'
]).
to
be_empty
)
end
end
context
'accepts reviewer_ids'
do
let
(
:params
)
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