diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-08 00:18:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-08 00:18:32 +0300 |
commit | 0f6fb8a8c9ccad0d0f4b8c5e2f72aa50d35a0d0d (patch) | |
tree | f6f7b86a0d17096a1a27740d5c2fedbd5a3b6815 /spec/frontend/api_spec.js | |
parent | 7fcb54624b31ff4b118d64ca4df36cba6d26c3eb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/api_spec.js')
-rw-r--r-- | spec/frontend/api_spec.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/frontend/api_spec.js b/spec/frontend/api_spec.js index 75faf6d66fa..bc3e12d3fc4 100644 --- a/spec/frontend/api_spec.js +++ b/spec/frontend/api_spec.js @@ -1619,6 +1619,28 @@ describe('Api', () => { }); }); + describe('projectSecureFiles', () => { + it('fetches secure files for a project', async () => { + const projectId = 1; + const secureFiles = [ + { + id: projectId, + title: 'File Name', + permissions: 'read_only', + checksum: '12345', + checksum_algorithm: 'sha256', + created_at: '2022-02-21T15:27:18', + }, + ]; + + const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects/${projectId}/secure_files`; + mock.onGet(expectedUrl).reply(httpStatus.OK, secureFiles); + const { data } = await Api.projectSecureFiles(projectId, {}); + + expect(data).toEqual(secureFiles); + }); + }); + describe('Feature Flag User List', () => { let expectedUrl; let projectId; |