diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-08 10:55:27 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-08 10:55:27 +0200 |
commit | 92b9d60c00432c58d6184f3683bdb14a0300a3c6 (patch) | |
tree | 4ef84e470e8289225c3987e48c458086b1883d67 /server/tests/utils/users/users.ts | |
parent | a031ab0b9b2f06969f074622383a5c974666ba93 (diff) | |
download | PeerTube-92b9d60c00432c58d6184f3683bdb14a0300a3c6.tar.gz PeerTube-92b9d60c00432c58d6184f3683bdb14a0300a3c6.tar.zst PeerTube-92b9d60c00432c58d6184f3683bdb14a0300a3c6.zip |
Add ability to delete our account
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, |