X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Ffeeds%2Ffeeds.ts;h=d978123cfc827449b0a22e28ae4da90f74146862;hb=68b6fd21b19ef17274e84dbb21ad7cfb7bc6c36a;hp=4510177ccf0de942ae8f9d86d4bd76c07d72dafb;hpb=4c1def5fd8e9f483238eb38e221f555e2e6bbf07;p=github%2FChocobozzz%2FPeerTube.git 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' import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments' import { waitJobs } from '../../../shared/extra-utils/server/jobs' import { User } from '../../../shared/models/users' +import { VideoPrivacy } from '@shared/models' chai.use(require('chai-xml')) chai.use(require('chai-json-schema')) @@ -77,6 +78,14 @@ describe('Test syndication feeds', () => { await addVideoCommentThread(servers[0].url, servers[0].accessToken, videoId, 'super comment 2') } + { + const videoAttributes = { name: 'unlisted video', privacy: VideoPrivacy.UNLISTED } + const res = await uploadVideo(servers[0].url, servers[0].accessToken, videoAttributes) + const videoId = res.body.video.id + + await addVideoCommentThread(servers[0].url, servers[0].accessToken, videoId, 'comment on unlisted video') + } + await waitJobs(servers) }) @@ -196,7 +205,8 @@ describe('Test syndication feeds', () => { }) describe('Video comments feed', function () { - it('Should contain valid comments (covers JSON feed 1.0 endpoint)', async function () { + + it('Should contain valid comments (covers JSON feed 1.0 endpoint) and not from unlisted videos', async function () { for (const server of servers) { const json = await getJSONfeed(server.url, 'video-comments')