aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-09 21:44:45 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-09 21:44:45 +0200
commit68a3b9f2aacb0225ae8b883b561b144bac339cbd (patch)
treee3d75b7952073ba4b2ef4b62ed57ded9f3cf0f1e /server/tests/utils
parent45b81debd6d6647980da7ad5a984bafa37cb79ea (diff)
downloadPeerTube-68a3b9f2aacb0225ae8b883b561b144bac339cbd.tar.gz
PeerTube-68a3b9f2aacb0225ae8b883b561b144bac339cbd.tar.zst
PeerTube-68a3b9f2aacb0225ae8b883b561b144bac339cbd.zip
Server: delete user with the id and not the username
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/users.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/tests/utils/users.js b/server/tests/utils/users.js
index ed7a9d672..3b560e409 100644
--- a/server/tests/utils/users.js
+++ b/server/tests/utils/users.js
@@ -52,7 +52,7 @@ function getUsersList (url, end) {
52 .end(end) 52 .end(end)
53} 53}
54 54
55function removeUser (url, token, username, expectedStatus, end) { 55function removeUser (url, userId, accessToken, expectedStatus, end) {
56 if (!end) { 56 if (!end) {
57 end = expectedStatus 57 end = expectedStatus
58 expectedStatus = 204 58 expectedStatus = 204
@@ -61,9 +61,9 @@ function removeUser (url, token, username, expectedStatus, end) {
61 const path = '/api/v1/users' 61 const path = '/api/v1/users'
62 62
63 request(url) 63 request(url)
64 .delete(path + '/' + username) 64 .delete(path + '/' + userId)
65 .set('Accept', 'application/json') 65 .set('Accept', 'application/json')
66 .set('Authorization', 'Bearer ' + token) 66 .set('Authorization', 'Bearer ' + accessToken)
67 .expect(expectedStatus) 67 .expect(expectedStatus)
68 .end(end) 68 .end(end)
69} 69}