aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/services.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-29 14:32:51 +0100
committerChocobozzz <me@florianbigard.com>2017-12-29 14:32:51 +0100
commit8b0d42ee372de6589796be26b83e5bffb1b69cdf (patch)
tree7e07bc3f40dc3285a090c030aca457a32eb1c7f8 /server/tests/api/videos/services.ts
parentb1f5b93e4f1a9ae9015463c9a4946722ed87ec2e (diff)
downloadPeerTube-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.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 () {