aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/users.js')
-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}