From 8b0d42ee372de6589796be26b83e5bffb1b69cdf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 29 Dec 2017 14:32:51 +0100 Subject: Fix tests --- server/tests/api/videos/services.ts | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'server/tests/api/videos/services.ts') diff --git a/server/tests/api/videos/services.ts b/server/tests/api/videos/services.ts index b3167aebc..699f79ab7 100644 --- a/server/tests/api/videos/services.ts +++ b/server/tests/api/videos/services.ts @@ -1,20 +1,12 @@ /* tslint:disable:no-unused-expression */ -import 'mocha' import * as chai from 'chai' -const expect = chai.expect - -import { - ServerInfo, - flushTests, - uploadVideo, - getVideosList, - setAccessTokensToServers, - killallServers, - getOEmbed -} from '../../utils/index' +import 'mocha' +import { flushTests, getOEmbed, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils/index' import { runServer } from '../../utils/server/servers' +const expect = chai.expect + describe('Test services', function () { let server: ServerInfo = null @@ -30,8 +22,10 @@ describe('Test services', function () { const videoAttributes = { name: 'my super name' } - const res = await uploadVideo(server.url, server.accessToken, videoAttributes) - server.video = res.body.video + await uploadVideo(server.url, server.accessToken, videoAttributes) + + const res = await getVideosList(server.url) + server.video = res.body.data[0] }) it('Should have a valid oEmbed response', async function () { -- cgit v1.2.3