Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-03-13 12:09:16 +00:00
parent e25ee76ede
commit 3af8411113
2 changed files with 0 additions and 29 deletions

View file

@ -31,7 +31,6 @@ const Api = {
projectLabelsPath: '/:namespace_path/:project_path/-/labels',
projectFileSchemaPath: '/:namespace_path/:project_path/-/schema/:ref/:filename',
projectUsersPath: '/api/:version/projects/:id/users',
projectGroupsPath: '/api/:version/projects/:id/groups.json',
projectInvitationsPath: '/api/:version/projects/:id/invitations',
projectMembersPath: '/api/:version/projects/:id/members',
projectMergeRequestsPath: '/api/:version/projects/:id/merge_requests',
@ -242,20 +241,6 @@ const Api = {
.then(({ data }) => data);
},
projectGroups(id, options) {
const url = Api.buildUrl(this.projectGroupsPath).replace(':id', encodeURIComponent(id));
return axios
.get(url, {
params: {
...options,
},
})
.then(({ data }) => {
return data;
});
},
addProjectMembersByUserId(id, data) {
const url = Api.buildUrl(this.projectMembersPath).replace(':id', encodeURIComponent(id));

View file

@ -352,20 +352,6 @@ describe('Api', () => {
});
});
describe('projectGroups', () => {
it('fetches a project group', async () => {
const options = { unused: 'option' };
const projectId = 1;
const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects/${projectId}/groups.json`;
mock.onGet(expectedUrl, { params: options }).reply(httpStatus.OK, {
name: 'test',
});
const { name } = await Api.projectGroups(projectId, options);
expect(name).toBe('test');
});
});
describe('projectUsers', () => {
it('fetches all users of a particular project', (done) => {
const query = 'dummy query';