diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-07 09:48:10 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-07 09:57:35 +0200 |
commit | 99d103019c76c517ba607a0fab8022aa6d08ef2e (patch) | |
tree | 7132bede03e32ab27d0f43de024b2080b473454f /server/tests/api/check-params/videos.ts | |
parent | 28be89161aab245526d64f6fb7dd29391a97fe0a (diff) | |
download | PeerTube-99d103019c76c517ba607a0fab8022aa6d08ef2e.tar.gz PeerTube-99d103019c76c517ba607a0fab8022aa6d08ef2e.tar.zst PeerTube-99d103019c76c517ba607a0fab8022aa6d08ef2e.zip |
Move fixtures in tests/
Diffstat (limited to 'server/tests/api/check-params/videos.ts')
-rw-r--r-- | server/tests/api/check-params/videos.ts | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index 7b40b91e7..bc6c7fc46 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts | |||
@@ -163,7 +163,7 @@ describe('Test videos API validator', function () { | |||
163 | describe('When adding a video', function () { | 163 | describe('When adding a video', function () { |
164 | let baseCorrectParams | 164 | let baseCorrectParams |
165 | const baseCorrectAttaches = { | 165 | const baseCorrectAttaches = { |
166 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short.webm') | 166 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short.webm') |
167 | } | 167 | } |
168 | 168 | ||
169 | before(function () { | 169 | before(function () { |
@@ -313,7 +313,7 @@ describe('Test videos API validator', function () { | |||
313 | it('Should fail without an incorrect input file', async function () { | 313 | it('Should fail without an incorrect input file', async function () { |
314 | const fields = baseCorrectParams | 314 | const fields = baseCorrectParams |
315 | const attaches = { | 315 | const attaches = { |
316 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 316 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
317 | } | 317 | } |
318 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 318 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
319 | }) | 319 | }) |
@@ -321,8 +321,8 @@ describe('Test videos API validator', function () { | |||
321 | it('Should fail with an incorrect thumbnail file', async function () { | 321 | it('Should fail with an incorrect thumbnail file', async function () { |
322 | const fields = baseCorrectParams | 322 | const fields = baseCorrectParams |
323 | const attaches = { | 323 | const attaches = { |
324 | 'thumbnailfile': join(__dirname, '..', 'fixtures', 'avatar.png'), | 324 | 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png'), |
325 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 325 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
326 | } | 326 | } |
327 | 327 | ||
328 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 328 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
@@ -331,8 +331,8 @@ describe('Test videos API validator', function () { | |||
331 | it('Should fail with a big thumbnail file', async function () { | 331 | it('Should fail with a big thumbnail file', async function () { |
332 | const fields = baseCorrectParams | 332 | const fields = baseCorrectParams |
333 | const attaches = { | 333 | const attaches = { |
334 | 'thumbnailfile': join(__dirname, '..', 'fixtures', 'avatar-big.png'), | 334 | 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png'), |
335 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 335 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
336 | } | 336 | } |
337 | 337 | ||
338 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 338 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
@@ -341,8 +341,8 @@ describe('Test videos API validator', function () { | |||
341 | it('Should fail with an incorrect preview file', async function () { | 341 | it('Should fail with an incorrect preview file', async function () { |
342 | const fields = baseCorrectParams | 342 | const fields = baseCorrectParams |
343 | const attaches = { | 343 | const attaches = { |
344 | 'previewfile': join(__dirname, '..', 'fixtures', 'avatar.png'), | 344 | 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png'), |
345 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 345 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
346 | } | 346 | } |
347 | 347 | ||
348 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 348 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
@@ -351,8 +351,8 @@ describe('Test videos API validator', function () { | |||
351 | it('Should fail with a big preview file', async function () { | 351 | it('Should fail with a big preview file', async function () { |
352 | const fields = baseCorrectParams | 352 | const fields = baseCorrectParams |
353 | const attaches = { | 353 | const attaches = { |
354 | 'previewfile': join(__dirname, '..', 'fixtures', 'avatar-big.png'), | 354 | 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png'), |
355 | 'videofile': join(__dirname, '..', 'fixtures', 'video_short_fake.webm') | 355 | 'videofile': join(__dirname, '..', '..', 'fixtures', 'video_short_fake.webm') |
356 | } | 356 | } |
357 | 357 | ||
358 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) | 358 | await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) |
@@ -377,7 +377,7 @@ describe('Test videos API validator', function () { | |||
377 | 377 | ||
378 | { | 378 | { |
379 | const attaches = immutableAssign(baseCorrectAttaches, { | 379 | const attaches = immutableAssign(baseCorrectAttaches, { |
380 | videofile: join(__dirname, '..', 'fixtures', 'video_short.mp4') | 380 | videofile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4') |
381 | }) | 381 | }) |
382 | 382 | ||
383 | await makeUploadRequest({ | 383 | await makeUploadRequest({ |
@@ -392,7 +392,7 @@ describe('Test videos API validator', function () { | |||
392 | 392 | ||
393 | { | 393 | { |
394 | const attaches = immutableAssign(baseCorrectAttaches, { | 394 | const attaches = immutableAssign(baseCorrectAttaches, { |
395 | videofile: join(__dirname, '..', 'fixtures', 'video_short.ogv') | 395 | videofile: join(__dirname, '..', '..', 'fixtures', 'video_short.ogv') |
396 | }) | 396 | }) |
397 | 397 | ||
398 | await makeUploadRequest({ | 398 | await makeUploadRequest({ |
@@ -510,7 +510,7 @@ describe('Test videos API validator', function () { | |||
510 | it('Should fail with an incorrect thumbnail file', async function () { | 510 | it('Should fail with an incorrect thumbnail file', async function () { |
511 | const fields = baseCorrectParams | 511 | const fields = baseCorrectParams |
512 | const attaches = { | 512 | const attaches = { |
513 | 'thumbnailfile': join(__dirname, '..', 'fixtures', 'avatar.png') | 513 | 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') |
514 | } | 514 | } |
515 | 515 | ||
516 | await makeUploadRequest({ | 516 | await makeUploadRequest({ |
@@ -526,7 +526,7 @@ describe('Test videos API validator', function () { | |||
526 | it('Should fail with a big thumbnail file', async function () { | 526 | it('Should fail with a big thumbnail file', async function () { |
527 | const fields = baseCorrectParams | 527 | const fields = baseCorrectParams |
528 | const attaches = { | 528 | const attaches = { |
529 | 'thumbnailfile': join(__dirname, '..', 'fixtures', 'avatar-big.png') | 529 | 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') |
530 | } | 530 | } |
531 | 531 | ||
532 | await makeUploadRequest({ | 532 | await makeUploadRequest({ |
@@ -542,7 +542,7 @@ describe('Test videos API validator', function () { | |||
542 | it('Should fail with an incorrect preview file', async function () { | 542 | it('Should fail with an incorrect preview file', async function () { |
543 | const fields = baseCorrectParams | 543 | const fields = baseCorrectParams |
544 | const attaches = { | 544 | const attaches = { |
545 | 'previewfile': join(__dirname, '..', 'fixtures', 'avatar.png') | 545 | 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') |
546 | } | 546 | } |
547 | 547 | ||
548 | await makeUploadRequest({ | 548 | await makeUploadRequest({ |
@@ -558,7 +558,7 @@ describe('Test videos API validator', function () { | |||
558 | it('Should fail with a big preview file', async function () { | 558 | it('Should fail with a big preview file', async function () { |
559 | const fields = baseCorrectParams | 559 | const fields = baseCorrectParams |
560 | const attaches = { | 560 | const attaches = { |
561 | 'previewfile': join(__dirname, '..', 'fixtures', 'avatar-big.png') | 561 | 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') |
562 | } | 562 | } |
563 | 563 | ||
564 | await makeUploadRequest({ | 564 | await makeUploadRequest({ |