Fixing closes_issues endpoint (#953)

This commit is contained in:
Justin Dalrymple 2020-07-08 20:55:23 +02:00 committed by GitHub
parent ef9548668c
commit f0e9ef8d2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -212,11 +212,7 @@ export class MergeRequests extends BaseService {
closesIssues(projectId: string | number, mergerequestIid: number, options?: Sudo) {
const [pId, mIid] = [projectId, mergerequestIid].map(encodeURIComponent);
return RequestHelper.get(
this,
`projects/${pId}/merge_requests/${mIid}/closes_merge_requests`,
options,
);
return RequestHelper.get(this, `projects/${pId}/merge_requests/${mIid}/closes_issues`, options);
}
commits(projectId: string | number, mergerequestIid: number, options?: Sudo) {

View File

@ -183,12 +183,12 @@ describe('MergeRequests.changes', () => {
});
describe('MergeRequests.closesIssues', () => {
it('should request GET projects/:id/merge_requests/:id/closes_merge_requests', async () => {
it('should request GET projects/:id/merge_requests/:id/closes_issues', async () => {
await service.closesIssues(2, 3);
expect(RequestHelper.get).toHaveBeenCalledWith(
service,
'projects/2/merge_requests/3/closes_merge_requests',
'projects/2/merge_requests/3/closes_issues',
undefined,
);
});