diff options
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 () { |