]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/single-server.ts
Fix getting avatars in videos list
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / single-server.ts
index 29dac6ec1c6ddd64129aef1fabda4c177d212879..d37043aef36a0fe66e6f13ebbecfd8cb65b2fb89 100644 (file)
@@ -2,17 +2,17 @@
 
 import 'mocha'
 import * as chai from 'chai'
+import { checkVideoFilesWereRemoved, completeVideoCheck, testImage } from '@server/tests/shared'
+import { wait } from '@shared/core-utils'
+import { Video, VideoPrivacy } from '@shared/models'
 import {
-  checkVideoFilesWereRemoved,
   cleanupTests,
-  completeVideoCheck,
   createSingleServer,
   PeerTubeServer,
   setAccessTokensToServers,
-  testImage,
-  wait
-} from '@shared/extra-utils'
-import { Video, VideoPrivacy } from '@shared/models'
+  setDefaultAccountAvatar,
+  setDefaultChannelAvatar
+} from '@shared/server-commands'
 
 const expect = chai.expect
 
@@ -97,6 +97,8 @@ describe('Test a single server', function () {
       server = await createSingleServer(1)
 
       await setAccessTokensToServers([ server ])
+      await setDefaultChannelAvatar(server)
+      await setDefaultAccountAvatar(server)
     })
 
     it('Should list video categories', async function () {
@@ -354,19 +356,6 @@ describe('Test a single server', function () {
       await server.videos.update({ id: videoId, attributes })
     })
 
-    it('Should filter by tags and category', async function () {
-      {
-        const { data, total } = await server.videos.list({ tagsAllOf: [ 'tagup1', 'tagup2' ], categoryOneOf: [ 4 ] })
-        expect(total).to.equal(1)
-        expect(data[0].name).to.equal('my super video updated')
-      }
-
-      {
-        const { total } = await server.videos.list({ tagsAllOf: [ 'tagup1', 'tagup2' ], categoryOneOf: [ 3 ] })
-        expect(total).to.equal(0)
-      }
-    })
-
     it('Should have the video updated', async function () {
       this.timeout(60000)