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
d4a12fbf
Commit
d4a12fbf
authored
Nov 04, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve test coverage for approvals API
parent
5146eaee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+6
-0
No files found.
spec/requests/api/merge_requests_spec.rb
View file @
d4a12fbf
...
...
@@ -702,12 +702,18 @@ describe API::API, api: true do
describe
'GET :id/merge_requests/:merge_request_id/approvals'
do
it
'retrieves the approval status'
do
approver
=
create
:user
project
.
update_attribute
(
:approvals_before_merge
,
2
)
project
.
team
<<
[
approver
,
:developer
]
project
.
team
<<
[
create
(
:user
),
:developer
]
merge_request
.
approvals
.
create
(
user:
approver
)
get
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
id
}
/approvals"
,
user
)
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
json_response
[
'approvals_required'
]).
to
eq
2
expect
(
json_response
[
'approvals_left'
]).
to
eq
1
expect
(
json_response
[
'approved_by'
][
0
][
'user'
][
'username'
]).
to
eq
(
approver
.
username
)
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