From 14d3270f363245d2c83fcc2ac109e39743b5627e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 9 Oct 2017 11:06:13 +0200 Subject: Change how we handle resolution It was an enum before, now we just use video height --- server/tests/utils/videos.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server/tests/utils') diff --git a/server/tests/utils/videos.ts b/server/tests/utils/videos.ts index 7f8bd39c0..2a9a236ca 100644 --- a/server/tests/utils/videos.ts +++ b/server/tests/utils/videos.ts @@ -196,14 +196,14 @@ function uploadVideo (url: string, accessToken: string, videoAttributesArg: Vide req.field('tags[' + i + ']', attributes.tags[i]) } - let filepath = '' + let filePath = '' if (isAbsolute(attributes.fixture)) { - filepath = attributes.fixture + filePath = attributes.fixture } else { - filepath = join(__dirname, '..', 'api', 'fixtures', attributes.fixture) + filePath = join(__dirname, '..', 'api', 'fixtures', attributes.fixture) } - return req.attach('videofile', filepath) + return req.attach('videofile', filePath) .expect(specialStatus) } @@ -238,9 +238,9 @@ function rateVideo (url: string, accessToken: string, id: number, rating: string .expect(specialStatus) } -function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolutionLabel: string) { +function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolution: number) { return new Promise((res, rej) => { - const torrentName = videoUUID + '-' + resolutionLabel + '.torrent' + const torrentName = videoUUID + '-' + resolution + '.torrent' const torrentPath = join(__dirname, '..', '..', '..', 'test' + server.serverNumber, 'torrents', torrentName) readFile(torrentPath, (err, data) => { if (err) return rej(err) -- cgit v1.2.3