aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/videos-overview.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/videos-overview.ts')
-rw-r--r--server/tests/api/videos/videos-overview.ts22
1 files changed, 13 insertions, 9 deletions
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts
index a2da2eaef..969393842 100644
--- a/server/tests/api/videos/videos-overview.ts
+++ b/server/tests/api/videos/videos-overview.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, flushAndRunServer, ServerInfo, setAccessTokensToServers, uploadVideo, wait } from '@shared/extra-utils' 5import { cleanupTests, flushAndRunServer, ServerInfo, setAccessTokensToServers, wait } from '@shared/extra-utils'
6import { VideosOverview } from '@shared/models' 6import { VideosOverview } from '@shared/models'
7 7
8const expect = chai.expect 8const expect = chai.expect
@@ -35,10 +35,12 @@ describe('Test a videos overview', function () {
35 35
36 await wait(3000) 36 await wait(3000)
37 37
38 await uploadVideo(server.url, server.accessToken, { 38 await server.videosCommand.upload({
39 name: 'video 0', 39 attributes: {
40 category: 3, 40 name: 'video 0',
41 tags: [ 'coucou1', 'coucou2' ] 41 category: 3,
42 tags: [ 'coucou1', 'coucou2' ]
43 }
42 }) 44 })
43 45
44 const body = await server.overviewsCommand.getVideos({ page: 1 }) 46 const body = await server.overviewsCommand.getVideos({ page: 1 })
@@ -51,10 +53,12 @@ describe('Test a videos overview', function () {
51 53
52 { 54 {
53 for (let i = 1; i < 6; i++) { 55 for (let i = 1; i < 6; i++) {
54 await uploadVideo(server.url, server.accessToken, { 56 await server.videosCommand.upload({
55 name: 'video ' + i, 57 attributes: {
56 category: 3, 58 name: 'video ' + i,
57 tags: [ 'coucou1', 'coucou2' ] 59 category: 3,
60 tags: [ 'coucou1', 'coucou2' ]
61 }
58 }) 62 })
59 } 63 }
60 64