aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-17 10:32:03 +0100
committerChocobozzz <me@florianbigard.com>2018-01-17 10:41:27 +0100
commitfd206f0b2d7e5c8e00e2817266d90ec54f79e1da (patch)
tree86b096cf2abd7eb49b892de1c9be855f45a41a9c /server/tests/utils/videos
parent9581cabc596acb18c0ad86bcf3a07c2b45e8e47e (diff)
downloadPeerTube-fd206f0b2d7e5c8e00e2817266d90ec54f79e1da.tar.gz
PeerTube-fd206f0b2d7e5c8e00e2817266d90ec54f79e1da.tar.zst
PeerTube-fd206f0b2d7e5c8e00e2817266d90ec54f79e1da.zip
Add ability to update some configuration keys
Diffstat (limited to 'server/tests/utils/videos')
-rw-r--r--server/tests/utils/videos/videos.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index dc1327215..095d4e29d 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -5,8 +5,9 @@ import { readFile } from 'fs'
5import * as parseTorrent from 'parse-torrent' 5import * as parseTorrent from 'parse-torrent'
6import { extname, isAbsolute, join } from 'path' 6import { extname, isAbsolute, join } from 'path'
7import * as request from 'supertest' 7import * as request from 'supertest'
8import { getMyUserInformation, makeGetRequest, readFilePromise, ServerInfo } from '../' 8import { getMyUserInformation, makeGetRequest, ServerInfo } from '../'
9import { VideoPrivacy } from '../../../../shared/models/videos' 9import { VideoPrivacy } from '../../../../shared/models/videos'
10import { readFileBufferPromise } from '../../../helpers/core-utils'
10import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../initializers' 11import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../initializers'
11import { dateIsValid, webtorrentAdd } from '../index' 12import { dateIsValid, webtorrentAdd } from '../index'
12 13
@@ -210,7 +211,7 @@ async function testVideoImage (url: string, imageName: string, imagePath: string
210 .get(imagePath) 211 .get(imagePath)
211 .expect(200) 212 .expect(200)
212 213
213 const data = await readFilePromise(join(__dirname, '..', '..', 'api', 'fixtures', imageName + extension)) 214 const data = await readFileBufferPromise(join(__dirname, '..', '..', 'api', 'fixtures', imageName + extension))
214 215
215 return data.equals(res.body) 216 return data.equals(res.body)
216 } else { 217 } else {