]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/services.ts
Add ability to update some configuration keys
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / services.ts
index b3167aebc70215082e0808f64042e3182f0ea686..699f79ab7268ffe8aa6e48b45120c9a0d2414bc5 100644 (file)
@@ -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 () {