diff options
Diffstat (limited to 'server/tests/utils/users/users.ts')
-rw-r--r-- | server/tests/utils/users/users.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/tests/utils/users/users.ts b/server/tests/utils/users/users.ts index 37b15f64a..e24e721bd 100644 --- a/server/tests/utils/users/users.ts +++ b/server/tests/utils/users/users.ts | |||
@@ -56,6 +56,16 @@ function getMyUserInformation (url: string, accessToken: string, specialStatus = | |||
56 | .expect('Content-Type', /json/) | 56 | .expect('Content-Type', /json/) |
57 | } | 57 | } |
58 | 58 | ||
59 | function deleteMe (url: string, accessToken: string, specialStatus = 204) { | ||
60 | const path = '/api/v1/users/me' | ||
61 | |||
62 | return request(url) | ||
63 | .delete(path) | ||
64 | .set('Accept', 'application/json') | ||
65 | .set('Authorization', 'Bearer ' + accessToken) | ||
66 | .expect(specialStatus) | ||
67 | } | ||
68 | |||
59 | function getMyUserVideoQuotaUsed (url: string, accessToken: string, specialStatus = 200) { | 69 | function getMyUserVideoQuotaUsed (url: string, accessToken: string, specialStatus = 200) { |
60 | const path = '/api/v1/users/me/video-quota-used' | 70 | const path = '/api/v1/users/me/video-quota-used' |
61 | 71 | ||
@@ -216,6 +226,7 @@ export { | |||
216 | registerUser, | 226 | registerUser, |
217 | getMyUserInformation, | 227 | getMyUserInformation, |
218 | getMyUserVideoRating, | 228 | getMyUserVideoRating, |
229 | deleteMe, | ||
219 | getMyUserVideoQuotaUsed, | 230 | getMyUserVideoQuotaUsed, |
220 | getUsersList, | 231 | getUsersList, |
221 | getUsersListPaginationAndSort, | 232 | getUsersListPaginationAndSort, |