diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-02-18 09:29:59 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-02-18 09:29:59 +0100 |
commit | ad4a8a1cca1049f600ebcdce9260c1021cd821a5 (patch) | |
tree | ca8ffba899b024d56d1bd7846f61aecae0821c82 /server/tests/api/check-params/pods.js | |
parent | 5d67f289df4a68e35ad7e0af3c601c7db0dc7586 (diff) | |
download | PeerTube-ad4a8a1cca1049f600ebcdce9260c1021cd821a5.tar.gz PeerTube-ad4a8a1cca1049f600ebcdce9260c1021cd821a5.tar.zst PeerTube-ad4a8a1cca1049f600ebcdce9260c1021cd821a5.zip |
Add email to users
Diffstat (limited to 'server/tests/api/check-params/pods.js')
-rw-r--r-- | server/tests/api/check-params/pods.js | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/server/tests/api/check-params/pods.js b/server/tests/api/check-params/pods.js index 8d52b69b1..22cbdb30f 100644 --- a/server/tests/api/check-params/pods.js +++ b/server/tests/api/check-params/pods.js | |||
@@ -39,7 +39,7 @@ describe('Test pods API validators', function () { | |||
39 | ], done) | 39 | ], done) |
40 | }) | 40 | }) |
41 | 41 | ||
42 | describe('When making friends', function () { | 42 | describe('When managing friends', function () { |
43 | let userAccessToken = null | 43 | let userAccessToken = null |
44 | 44 | ||
45 | before(function (done) { | 45 | before(function (done) { |
@@ -156,13 +156,32 @@ describe('Test pods API validators', function () { | |||
156 | 156 | ||
157 | it('Should fail without public key', function (done) { | 157 | it('Should fail without public key', function (done) { |
158 | const data = { | 158 | const data = { |
159 | email: 'testexample.com', | ||
159 | host: 'coucou.com' | 160 | host: 'coucou.com' |
160 | } | 161 | } |
161 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done) | 162 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done) |
162 | }) | 163 | }) |
163 | 164 | ||
165 | it('Should fail without an email', function (done) { | ||
166 | const data = { | ||
167 | host: 'coucou.com', | ||
168 | publicKey: 'mysuperpublickey' | ||
169 | } | ||
170 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done) | ||
171 | }) | ||
172 | |||
173 | it('Should fail without an invalid email', function (done) { | ||
174 | const data = { | ||
175 | host: 'coucou.com', | ||
176 | email: 'testexample.com', | ||
177 | publicKey: 'mysuperpublickey' | ||
178 | } | ||
179 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done) | ||
180 | }) | ||
181 | |||
164 | it('Should fail without an host', function (done) { | 182 | it('Should fail without an host', function (done) { |
165 | const data = { | 183 | const data = { |
184 | email: 'testexample.com', | ||
166 | publicKey: 'mysuperpublickey' | 185 | publicKey: 'mysuperpublickey' |
167 | } | 186 | } |
168 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done) | 187 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done) |
@@ -171,6 +190,7 @@ describe('Test pods API validators', function () { | |||
171 | it('Should fail with an incorrect host', function (done) { | 190 | it('Should fail with an incorrect host', function (done) { |
172 | const data = { | 191 | const data = { |
173 | host: 'http://coucou.com', | 192 | host: 'http://coucou.com', |
193 | email: 'testexample.com', | ||
174 | publicKey: 'mysuperpublickey' | 194 | publicKey: 'mysuperpublickey' |
175 | } | 195 | } |
176 | requestsUtils.makePostBodyRequest(server.url, path, null, data, function () { | 196 | requestsUtils.makePostBodyRequest(server.url, path, null, data, function () { |
@@ -185,6 +205,7 @@ describe('Test pods API validators', function () { | |||
185 | it('Should succeed with the correct parameters', function (done) { | 205 | it('Should succeed with the correct parameters', function (done) { |
186 | const data = { | 206 | const data = { |
187 | host: 'coucou.com', | 207 | host: 'coucou.com', |
208 | email: 'test@example.com', | ||
188 | publicKey: 'mysuperpublickey' | 209 | publicKey: 'mysuperpublickey' |
189 | } | 210 | } |
190 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done, 200) | 211 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done, 200) |
@@ -193,6 +214,7 @@ describe('Test pods API validators', function () { | |||
193 | it('Should fail with a host that already exists', function (done) { | 214 | it('Should fail with a host that already exists', function (done) { |
194 | const data = { | 215 | const data = { |
195 | host: 'coucou.com', | 216 | host: 'coucou.com', |
217 | email: 'test@example.com', | ||
196 | publicKey: 'mysuperpublickey' | 218 | publicKey: 'mysuperpublickey' |
197 | } | 219 | } |
198 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done, 409) | 220 | requestsUtils.makePostBodyRequest(server.url, path, null, data, done, 409) |