Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-11 18:08:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-11 18:08:32 +0300
commitf1ce71c88c407709987dd4a7b40bdb7596b6baa2 (patch)
tree0d20ea80baaf8c11524584f586c2cc763af07cb2 /spec/frontend/api
parent28e90894e1e6f17320f5b1d2fff6fe736bf65dff (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/api')
-rw-r--r--spec/frontend/api/projects_api_spec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/frontend/api/projects_api_spec.js b/spec/frontend/api/projects_api_spec.js
index 2d54d6173fd..4ceed885e6e 100644
--- a/spec/frontend/api/projects_api_spec.js
+++ b/spec/frontend/api/projects_api_spec.js
@@ -67,6 +67,20 @@ describe('~/api/projects_api.js', () => {
});
});
+ describe('createProject', () => {
+ it('posts to the correct URL and returns the data', () => {
+ const body = { name: 'test project' };
+ const expectedUrl = '/api/v7/projects.json';
+ const expectedRes = { id: 999, name: 'test project' };
+
+ mock.onPost(expectedUrl, body).replyOnce(HTTP_STATUS_OK, { data: expectedRes });
+
+ return projectsApi.createProject(body).then(({ data }) => {
+ expect(data).toStrictEqual(expectedRes);
+ });
+ });
+ });
+
describe('importProjectMembers', () => {
beforeEach(() => {
jest.spyOn(axios, 'post');