aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-07 17:03:56 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-07 17:05:23 +0100
commit8e7f08b5a5e65195ad6dd3d7850fda57021421f3 (patch)
tree1ee2bff1a5a51643e6b86c6f21e4766013a9213d /server/tests/api/check-params/videos.ts
parent27e1a06c331278e5d37bc5172ee7e4fc968e4b5e (diff)
downloadPeerTube-8e7f08b5a5e65195ad6dd3d7850fda57021421f3.tar.gz
PeerTube-8e7f08b5a5e65195ad6dd3d7850fda57021421f3.tar.zst
PeerTube-8e7f08b5a5e65195ad6dd3d7850fda57021421f3.zip
Make some fields optional when uploading a video
Diffstat (limited to 'server/tests/api/check-params/videos.ts')
-rw-r--r--server/tests/api/check-params/videos.ts24
1 files changed, 0 insertions, 24 deletions
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts
index 2962f5640..00a209665 100644
--- a/server/tests/api/check-params/videos.ts
+++ b/server/tests/api/check-params/videos.ts
@@ -189,14 +189,6 @@ describe('Test videos API validator', function () {
189 await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) 189 await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
190 }) 190 })
191 191
192 it('Should fail without a category', async function () {
193 const fields = getCompleteVideoUploadAttributes()
194 delete fields.category
195
196 const attaches = getVideoUploadAttaches
197 await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
198 })
199
200 it('Should fail with a bad category', async function () { 192 it('Should fail with a bad category', async function () {
201 const fields = getCompleteVideoUploadAttributes() 193 const fields = getCompleteVideoUploadAttributes()
202 fields.category = 125 194 fields.category = 125
@@ -205,14 +197,6 @@ describe('Test videos API validator', function () {
205 await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) 197 await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
206 }) 198 })
207 199
208 it('Should fail without a licence', async function () {
209 const fields = getCompleteVideoUploadAttributes()
210 delete fields.licence
211
212 const attaches = getVideoUploadAttaches()
213 await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
214 })
215
216 it('Should fail with a bad licence', async function () { 200 it('Should fail with a bad licence', async function () {
217 const fields = getCompleteVideoUploadAttributes() 201 const fields = getCompleteVideoUploadAttributes()
218 fields.licence = 125 202 fields.licence = 125
@@ -245,14 +229,6 @@ describe('Test videos API validator', function () {
245 await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) 229 await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
246 }) 230 })
247 231
248 it('Should fail without description', async function () {
249 const fields = getCompleteVideoUploadAttributes()
250 delete fields.description
251
252 const attaches = getVideoUploadAttaches()
253 await makePostUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
254 })
255
256 it('Should fail with a long description', async function () { 232 it('Should fail with a long description', async function () {
257 const fields = getCompleteVideoUploadAttributes() 233 const fields = getCompleteVideoUploadAttributes()
258 fields.description = 'my super description which is very very very very very very very very very very very very long'.repeat(35) 234 fields.description = 'my super description which is very very very very very very very very very very very very long'.repeat(35)