diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-08 12:53:09 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-08 12:53:09 +0100 |
commit | ce5496d6a31b9617aba67970f5dc135e73335234 (patch) | |
tree | b5d2578f4618b71632e92838c3ceae36aa102798 /server/tests/utils/users | |
parent | 108af66140713c4beec681a71d360ab788226528 (diff) | |
download | PeerTube-ce5496d6a31b9617aba67970f5dc135e73335234.tar.gz PeerTube-ce5496d6a31b9617aba67970f5dc135e73335234.tar.zst PeerTube-ce5496d6a31b9617aba67970f5dc135e73335234.zip |
Support video quota on client
Diffstat (limited to 'server/tests/utils/users')
-rw-r--r-- | server/tests/utils/users/users.ts | 12 |
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 | ||
59 | function 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 | |||
59 | function getUserInformation (url: string, accessToken: string, userId: number) { | 70 | function 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, |