aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/users.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-02-18 09:29:59 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-02-18 09:29:59 +0100
commitad4a8a1cca1049f600ebcdce9260c1021cd821a5 (patch)
treeca8ffba899b024d56d1bd7846f61aecae0821c82 /server/tests/utils/users.js
parent5d67f289df4a68e35ad7e0af3c601c7db0dc7586 (diff)
downloadPeerTube-ad4a8a1cca1049f600ebcdce9260c1021cd821a5.tar.gz
PeerTube-ad4a8a1cca1049f600ebcdce9260c1021cd821a5.tar.zst
PeerTube-ad4a8a1cca1049f600ebcdce9260c1021cd821a5.zip
Add email to users
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}