diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-17 10:32:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-17 10:41:27 +0100 |
commit | fd206f0b2d7e5c8e00e2817266d90ec54f79e1da (patch) | |
tree | 86b096cf2abd7eb49b892de1c9be855f45a41a9c /server/tests/utils/videos | |
parent | 9581cabc596acb18c0ad86bcf3a07c2b45e8e47e (diff) | |
download | PeerTube-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.ts | 5 |
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' | |||
5 | import * as parseTorrent from 'parse-torrent' | 5 | import * as parseTorrent from 'parse-torrent' |
6 | import { extname, isAbsolute, join } from 'path' | 6 | import { extname, isAbsolute, join } from 'path' |
7 | import * as request from 'supertest' | 7 | import * as request from 'supertest' |
8 | import { getMyUserInformation, makeGetRequest, readFilePromise, ServerInfo } from '../' | 8 | import { getMyUserInformation, makeGetRequest, ServerInfo } from '../' |
9 | import { VideoPrivacy } from '../../../../shared/models/videos' | 9 | import { VideoPrivacy } from '../../../../shared/models/videos' |
10 | import { readFileBufferPromise } from '../../../helpers/core-utils' | ||
10 | import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../initializers' | 11 | import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../initializers' |
11 | import { dateIsValid, webtorrentAdd } from '../index' | 12 | import { 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 { |