aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/users
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/users')
-rw-r--r--server/tests/utils/users/users.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tests/utils/users/users.ts b/server/tests/utils/users/users.ts
index 90b1ca0a6..12945a805 100644
--- a/server/tests/utils/users/users.ts
+++ b/server/tests/utils/users/users.ts
@@ -56,6 +56,17 @@ function getMyUserInformation (url: string, accessToken: string, specialStatus =
56 .expect('Content-Type', /json/) 56 .expect('Content-Type', /json/)
57} 57}
58 58
59function getMyUserVideoQuotaUsed (url: string, accessToken: string, specialStatus = 200) {
60 const path = '/api/v1/users/me/video-quota-used'
61
62 return request(url)
63 .get(path)
64 .set('Accept', 'application/json')
65 .set('Authorization', 'Bearer ' + accessToken)
66 .expect(specialStatus)
67 .expect('Content-Type', /json/)
68}
69
59function getUserInformation (url: string, accessToken: string, userId: number) { 70function getUserInformation (url: string, accessToken: string, userId: number) {
60 const path = '/api/v1/users/' + userId 71 const path = '/api/v1/users/' + userId
61 72
@@ -192,6 +203,7 @@ export {
192 registerUser, 203 registerUser,
193 getMyUserInformation, 204 getMyUserInformation,
194 getMyUserVideoRating, 205 getMyUserVideoRating,
206 getMyUserVideoQuotaUsed,
195 getUsersList, 207 getUsersList,
196 getUsersListPaginationAndSort, 208 getUsersListPaginationAndSort,
197 removeUser, 209 removeUser,