aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-channel-syncs.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/video-channel-syncs.ts')
-rw-r--r--server/tests/api/videos/video-channel-syncs.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tests/api/videos/video-channel-syncs.ts b/server/tests/api/videos/video-channel-syncs.ts
index 229c01f68..835d3cb09 100644
--- a/server/tests/api/videos/video-channel-syncs.ts
+++ b/server/tests/api/videos/video-channel-syncs.ts
@@ -23,7 +23,10 @@ describe('Test channel synchronizations', function () {
23 describe('Sync using ' + mode, function () { 23 describe('Sync using ' + mode, function () {
24 let server: PeerTubeServer 24 let server: PeerTubeServer
25 let command: ChannelSyncsCommand 25 let command: ChannelSyncsCommand
26
26 let startTestDate: Date 27 let startTestDate: Date
28
29 let rootChannelSyncId: number
27 const userInfo = { 30 const userInfo = {
28 accessToken: '', 31 accessToken: '',
29 username: 'user1', 32 username: 'user1',
@@ -90,6 +93,7 @@ describe('Test channel synchronizations', function () {
90 token: server.accessToken, 93 token: server.accessToken,
91 expectedStatus: HttpStatusCode.OK_200 94 expectedStatus: HttpStatusCode.OK_200
92 }) 95 })
96 rootChannelSyncId = videoChannelSync.id
93 97
94 // Ensure any missing video not already fetched will be considered as new 98 // Ensure any missing video not already fetched will be considered as new
95 await changeDateForSync(videoChannelSync.id, '1970-01-01') 99 await changeDateForSync(videoChannelSync.id, '1970-01-01')
@@ -208,6 +212,14 @@ describe('Test channel synchronizations', function () {
208 } 212 }
209 }) 213 })
210 214
215 it('Should list imports of a channel synchronization', async function () {
216 const { total, data } = await server.imports.getMyVideoImports({ videoChannelSyncId: rootChannelSyncId })
217
218 expect(total).to.equal(1)
219 expect(data).to.have.lengthOf(1)
220 expect(data[0].video.name).to.equal('test')
221 })
222
211 it('Should remove user\'s channel synchronizations', async function () { 223 it('Should remove user\'s channel synchronizations', async function () {
212 await command.delete({ channelSyncId: userInfo.syncId }) 224 await command.delete({ channelSyncId: userInfo.syncId })
213 225