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.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/tests/utils/users.js b/server/tests/utils/users.js
index 2bf9c6e3e..a2c010f64 100644
--- a/server/tests/utils/users.js
+++ b/server/tests/utils/users.js
@@ -20,12 +20,17 @@ function createUser (url, accessToken, username, password, specialStatus, end) {
20 } 20 }
21 21
22 const path = '/api/v1/users' 22 const path = '/api/v1/users'
23 const body = {
24 username,
25 password,
26 email: username + '@example.com'
27 }
23 28
24 request(url) 29 request(url)
25 .post(path) 30 .post(path)
26 .set('Accept', 'application/json') 31 .set('Accept', 'application/json')
27 .set('Authorization', 'Bearer ' + accessToken) 32 .set('Authorization', 'Bearer ' + accessToken)
28 .send({ username: username, password: password }) 33 .send(body)
29 .expect(specialStatus) 34 .expect(specialStatus)
30 .end(end) 35 .end(end)
31} 36}