aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/feeds/feeds.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts
index 4510177cc..d978123cf 100644
--- a/server/tests/feeds/feeds.ts
+++ b/server/tests/feeds/feeds.ts
@@ -19,6 +19,7 @@ import * as libxmljs from 'libxmljs'
19import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments' 19import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments'
20import { waitJobs } from '../../../shared/extra-utils/server/jobs' 20import { waitJobs } from '../../../shared/extra-utils/server/jobs'
21import { User } from '../../../shared/models/users' 21import { User } from '../../../shared/models/users'
22import { VideoPrivacy } from '@shared/models'
22 23
23chai.use(require('chai-xml')) 24chai.use(require('chai-xml'))
24chai.use(require('chai-json-schema')) 25chai.use(require('chai-json-schema'))
@@ -77,6 +78,14 @@ describe('Test syndication feeds', () => {
77 await addVideoCommentThread(servers[0].url, servers[0].accessToken, videoId, 'super comment 2') 78 await addVideoCommentThread(servers[0].url, servers[0].accessToken, videoId, 'super comment 2')
78 } 79 }
79 80
81 {
82 const videoAttributes = { name: 'unlisted video', privacy: VideoPrivacy.UNLISTED }
83 const res = await uploadVideo(servers[0].url, servers[0].accessToken, videoAttributes)
84 const videoId = res.body.video.id
85
86 await addVideoCommentThread(servers[0].url, servers[0].accessToken, videoId, 'comment on unlisted video')
87 }
88
80 await waitJobs(servers) 89 await waitJobs(servers)
81 }) 90 })
82 91
@@ -196,7 +205,8 @@ describe('Test syndication feeds', () => {
196 }) 205 })
197 206
198 describe('Video comments feed', function () { 207 describe('Video comments feed', function () {
199 it('Should contain valid comments (covers JSON feed 1.0 endpoint)', async function () { 208
209 it('Should contain valid comments (covers JSON feed 1.0 endpoint) and not from unlisted videos', async function () {
200 for (const server of servers) { 210 for (const server of servers) {
201 const json = await getJSONfeed(server.url, 'video-comments') 211 const json = await getJSONfeed(server.url, 'video-comments')
202 212