diff options
Diffstat (limited to 'server/tests/feeds')
-rw-r--r-- | server/tests/feeds/feeds.ts | 12 |
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' | |||
19 | import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments' | 19 | import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-comments' |
20 | import { waitJobs } from '../../../shared/extra-utils/server/jobs' | 20 | import { waitJobs } from '../../../shared/extra-utils/server/jobs' |
21 | import { User } from '../../../shared/models/users' | 21 | import { User } from '../../../shared/models/users' |
22 | import { VideoPrivacy } from '@shared/models' | ||
22 | 23 | ||
23 | chai.use(require('chai-xml')) | 24 | chai.use(require('chai-xml')) |
24 | chai.use(require('chai-json-schema')) | 25 | chai.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 | ||