From 92b9d60c00432c58d6184f3683bdb14a0300a3c6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 8 Aug 2018 10:55:27 +0200 Subject: Add ability to delete our account --- server/tests/utils/users/users.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'server/tests/utils/users') 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 = .expect('Content-Type', /json/) } +function deleteMe (url: string, accessToken: string, specialStatus = 204) { + const path = '/api/v1/users/me' + + return request(url) + .delete(path) + .set('Accept', 'application/json') + .set('Authorization', 'Bearer ' + accessToken) + .expect(specialStatus) +} + function getMyUserVideoQuotaUsed (url: string, accessToken: string, specialStatus = 200) { const path = '/api/v1/users/me/video-quota-used' @@ -216,6 +226,7 @@ export { registerUser, getMyUserInformation, getMyUserVideoRating, + deleteMe, getMyUserVideoQuotaUsed, getUsersList, getUsersListPaginationAndSort, -- cgit v1.2.3