aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-28 17:25:10 +0100
committerChocobozzz <me@florianbigard.com>2017-12-28 17:25:10 +0100
commit59651eee5600839cdc62911a211d61457d8456b7 (patch)
tree4989d6a526b302bf82390fb9970f3066972474a0
parent5960f92395e81cc851d4536325bee72ba930de3f (diff)
downloadPeerTube-59651eee5600839cdc62911a211d61457d8456b7.tar.gz
PeerTube-59651eee5600839cdc62911a211d61457d8456b7.tar.zst
PeerTube-59651eee5600839cdc62911a211d61457d8456b7.zip
Fix videos tests
-rw-r--r--server/tests/api/videos/multiple-servers.ts2
-rw-r--r--server/tests/api/videos/single-server.ts4
-rw-r--r--server/tests/utils/videos/videos.ts12
3 files changed, 11 insertions, 7 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index 0c6508e71..2a943fe45 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -822,7 +822,7 @@ describe('Test multiple servers', function () {
822 .field('nsfw', 'false') 822 .field('nsfw', 'false')
823 .field('channelId', '1') 823 .field('channelId', '1')
824 824
825 const filePath = join(__dirname, '..', 'api', 'fixtures', 'video_short.webm') 825 const filePath = join(__dirname, '..', '..', 'api', 'fixtures', 'video_short.webm')
826 826
827 await req.attach('videofile', filePath) 827 await req.attach('videofile', filePath)
828 .expect(200) 828 .expect(200)
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index 02723654d..c503ec0e7 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -337,10 +337,10 @@ describe('Test a single server', function () {
337 it('Should remove the video', async function () { 337 it('Should remove the video', async function () {
338 await removeVideo(server.url, server.accessToken, videoId) 338 await removeVideo(server.url, server.accessToken, videoId)
339 339
340 const files1 = await readdirPromise(join(__dirname, '..', '..', '..', 'test1/videos/')) 340 const files1 = await readdirPromise(join(__dirname, '..', '..', '..', '..', 'test1/videos/'))
341 expect(files1).to.have.lengthOf(0) 341 expect(files1).to.have.lengthOf(0)
342 342
343 const files2 = await readdirPromise(join(__dirname, '..', '..', '..', 'test1/thumbnails/')) 343 const files2 = await readdirPromise(join(__dirname, '..', '..', '..', '..', 'test1/thumbnails/'))
344 expect(files2).to.have.lengthOf(0) 344 expect(files2).to.have.lengthOf(0)
345 }) 345 })
346 346
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index 166253ffc..739394253 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -23,7 +23,8 @@ function getVideoCategories (url: string) {
23 23
24 return makeGetRequest({ 24 return makeGetRequest({
25 url, 25 url,
26 path 26 path,
27 statusCodeExpected: 200
27 }) 28 })
28} 29}
29 30
@@ -32,7 +33,8 @@ function getVideoLicences (url: string) {
32 33
33 return makeGetRequest({ 34 return makeGetRequest({
34 url, 35 url,
35 path 36 path,
37 statusCodeExpected: 200
36 }) 38 })
37} 39}
38 40
@@ -41,7 +43,8 @@ function getVideoLanguages (url: string) {
41 43
42 return makeGetRequest({ 44 return makeGetRequest({
43 url, 45 url,
44 path 46 path,
47 statusCodeExpected: 200
45 }) 48 })
46} 49}
47 50
@@ -50,7 +53,8 @@ function getVideoPrivacies (url: string) {
50 53
51 return makeGetRequest({ 54 return makeGetRequest({
52 url, 55 url,
53 path 56 path,
57 statusCodeExpected: 200
54 }) 58 })
55} 59}
56 60