From ce5496d6a31b9617aba67970f5dc135e73335234 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 8 Jan 2018 12:53:09 +0100 Subject: Support video quota on client --- server/tests/utils/users/users.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'server/tests/utils') 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 = .expect('Content-Type', /json/) } +function getMyUserVideoQuotaUsed (url: string, accessToken: string, specialStatus = 200) { + const path = '/api/v1/users/me/video-quota-used' + + return request(url) + .get(path) + .set('Accept', 'application/json') + .set('Authorization', 'Bearer ' + accessToken) + .expect(specialStatus) + .expect('Content-Type', /json/) +} + function getUserInformation (url: string, accessToken: string, userId: number) { const path = '/api/v1/users/' + userId @@ -192,6 +203,7 @@ export { registerUser, getMyUserInformation, getMyUserVideoRating, + getMyUserVideoQuotaUsed, getUsersList, getUsersListPaginationAndSort, removeUser, -- cgit v1.2.3