diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-29 14:32:51 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-29 14:32:51 +0100 |
commit | 8b0d42ee372de6589796be26b83e5bffb1b69cdf (patch) | |
tree | 7e07bc3f40dc3285a090c030aca457a32eb1c7f8 /server/tests/api/videos/services.ts | |
parent | b1f5b93e4f1a9ae9015463c9a4946722ed87ec2e (diff) | |
download | PeerTube-8b0d42ee372de6589796be26b83e5bffb1b69cdf.tar.gz PeerTube-8b0d42ee372de6589796be26b83e5bffb1b69cdf.tar.zst PeerTube-8b0d42ee372de6589796be26b83e5bffb1b69cdf.zip |
Fix tests
Diffstat (limited to 'server/tests/api/videos/services.ts')
-rw-r--r-- | server/tests/api/videos/services.ts | 22 |
1 files changed, 8 insertions, 14 deletions
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 @@ | |||
1 | /* tslint:disable:no-unused-expression */ | 1 | /* tslint:disable:no-unused-expression */ |
2 | 2 | ||
3 | import 'mocha' | ||
4 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
5 | const expect = chai.expect | 4 | import 'mocha' |
6 | 5 | import { flushTests, getOEmbed, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils/index' | |
7 | import { | ||
8 | ServerInfo, | ||
9 | flushTests, | ||
10 | uploadVideo, | ||
11 | getVideosList, | ||
12 | setAccessTokensToServers, | ||
13 | killallServers, | ||
14 | getOEmbed | ||
15 | } from '../../utils/index' | ||
16 | import { runServer } from '../../utils/server/servers' | 6 | import { runServer } from '../../utils/server/servers' |
17 | 7 | ||
8 | const expect = chai.expect | ||
9 | |||
18 | describe('Test services', function () { | 10 | describe('Test services', function () { |
19 | let server: ServerInfo = null | 11 | let server: ServerInfo = null |
20 | 12 | ||
@@ -30,8 +22,10 @@ describe('Test services', function () { | |||
30 | const videoAttributes = { | 22 | const videoAttributes = { |
31 | name: 'my super name' | 23 | name: 'my super name' |
32 | } | 24 | } |
33 | const res = await uploadVideo(server.url, server.accessToken, videoAttributes) | 25 | await uploadVideo(server.url, server.accessToken, videoAttributes) |
34 | server.video = res.body.video | 26 | |
27 | const res = await getVideosList(server.url) | ||
28 | server.video = res.body.data[0] | ||
35 | }) | 29 | }) |
36 | 30 | ||
37 | it('Should have a valid oEmbed response', async function () { | 31 | it('Should have a valid oEmbed response', async function () { |