]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/filter-hooks.ts
Rename captions commands
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / filter-hooks.ts
index df52bb3b57489a59861b2d347a01ff4ce97c868c..c00ac8f91701a9d7cfd20a1efe21fa00fba870dc 100644 (file)
@@ -2,7 +2,6 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { HttpStatusCode } from '@shared/core-utils'
 import {
   cleanupTests,
   createMultipleServers,
@@ -15,7 +14,7 @@ import {
   setDefaultVideoChannel,
   waitJobs
 } from '@shared/extra-utils'
-import { VideoDetails, VideoImportState, VideoPlaylist, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models'
+import { HttpStatusCode, VideoDetails, VideoImportState, VideoPlaylist, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect
 
@@ -71,28 +70,28 @@ describe('Test plugin filter hooks', function () {
   })
 
   it('Should run filter:api.accounts.videos.list.params', async function () {
-    const { data } = await servers[0].videos.listByAccount({ accountName: 'root', start: 0, count: 2 })
+    const { data } = await servers[0].videos.listByAccount({ handle: 'root', start: 0, count: 2 })
 
     // 1 plugin do +1 to the count parameter
     expect(data).to.have.lengthOf(3)
   })
 
   it('Should run filter:api.accounts.videos.list.result', async function () {
-    const { total } = await servers[0].videos.listByAccount({ accountName: 'root', start: 0, count: 2 })
+    const { total } = await servers[0].videos.listByAccount({ handle: 'root', start: 0, count: 2 })
 
     // Plugin do +2 to the total result
     expect(total).to.equal(12)
   })
 
   it('Should run filter:api.video-channels.videos.list.params', async function () {
-    const { data } = await servers[0].videos.listByChannel({ videoChannelName: 'root_channel', start: 0, count: 2 })
+    const { data } = await servers[0].videos.listByChannel({ handle: 'root_channel', start: 0, count: 2 })
 
     // 1 plugin do +3 to the count parameter
     expect(data).to.have.lengthOf(5)
   })
 
   it('Should run filter:api.video-channels.videos.list.result', async function () {
-    const { total } = await servers[0].videos.listByChannel({ videoChannelName: 'root_channel', start: 0, count: 2 })
+    const { total } = await servers[0].videos.listByChannel({ handle: 'root_channel', start: 0, count: 2 })
 
     // Plugin do +3 to the total result
     expect(total).to.equal(13)