aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/services.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/services.ts')
-rw-r--r--server/tests/api/videos/services.ts22
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
3import 'mocha'
4import * as chai from 'chai' 3import * as chai from 'chai'
5const expect = chai.expect 4import 'mocha'
6 5import { flushTests, getOEmbed, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../utils/index'
7import {
8 ServerInfo,
9 flushTests,
10 uploadVideo,
11 getVideosList,
12 setAccessTokensToServers,
13 killallServers,
14 getOEmbed
15} from '../../utils/index'
16import { runServer } from '../../utils/server/servers' 6import { runServer } from '../../utils/server/servers'
17 7
8const expect = chai.expect
9
18describe('Test services', function () { 10describe('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 () {