From a7ba16b62d18a53c416d248f4be06fb693b318ac Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 29 Dec 2017 10:04:15 +0100 Subject: Fix real world script --- server/tests/api/videos/services.ts | 6 ++---- server/tests/api/videos/video-transcoder.ts | 20 ++++++-------------- 2 files changed, 8 insertions(+), 18 deletions(-) (limited to 'server/tests/api/videos') diff --git a/server/tests/api/videos/services.ts b/server/tests/api/videos/services.ts index 1cda464d9..b3167aebc 100644 --- a/server/tests/api/videos/services.ts +++ b/server/tests/api/videos/services.ts @@ -30,10 +30,8 @@ describe('Test services', function () { const videoAttributes = { name: 'my super name' } - await uploadVideo(server.url, server.accessToken, videoAttributes) - - const res = await getVideosList(server.url) - server.video = res.body.data[0] + const res = await uploadVideo(server.url, server.accessToken, videoAttributes) + server.video = res.body.video }) it('Should have a valid oEmbed response', async function () { diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts index 27927a594..9ce2ae190 100644 --- a/server/tests/api/videos/video-transcoder.ts +++ b/server/tests/api/videos/video-transcoder.ts @@ -1,21 +1,13 @@ /* tslint:disable:no-unused-expression */ -import 'mocha' import * as chai from 'chai' -const expect = chai.expect - +import 'mocha' import { - ServerInfo, - flushTests, - uploadVideo, - getVideosList, - wait, - setAccessTokensToServers, - flushAndRunMultipleServers, - killallServers, - webtorrentAdd, - getVideo -} from '../../utils/index' + flushAndRunMultipleServers, flushTests, getVideo, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo, + wait, webtorrentAdd +} from '../../utils' + +const expect = chai.expect describe('Test video transcoding', function () { let servers: ServerInfo[] = [] -- cgit v1.2.3