aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/feeds
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-06 14:12:12 +0200
committerChocobozzz <me@florianbigard.com>2020-05-06 14:12:12 +0200
commit1df8a4d79a491d2ad5bdd9329f37e52cba21238c (patch)
tree4d678958352f1d6044c2ef9fe052f66d323a01b0 /server/tests/feeds
parentf375bb3db401e42b4317545a7e40dcfda692604d (diff)
downloadPeerTube-1df8a4d79a491d2ad5bdd9329f37e52cba21238c.tar.gz
PeerTube-1df8a4d79a491d2ad5bdd9329f37e52cba21238c.tar.zst
PeerTube-1df8a4d79a491d2ad5bdd9329f37e52cba21238c.zip
Fix comments feed with musted accounts
Diffstat (limited to 'server/tests/feeds')
-rw-r--r--server/tests/feeds/feeds.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts
index d978123cf..7fac921a3 100644
--- a/server/tests/feeds/feeds.ts
+++ b/server/tests/feeds/feeds.ts
@@ -20,6 +20,7 @@ import { addVideoCommentThread } from '../../../shared/extra-utils/videos/video-
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' 22import { VideoPrivacy } from '@shared/models'
23import { addAccountToServerBlocklist } from '@shared/extra-utils/users/blocklist'
23 24
24chai.use(require('chai-xml')) 25chai.use(require('chai-xml'))
25chai.use(require('chai-json-schema')) 26chai.use(require('chai-json-schema'))
@@ -216,6 +217,17 @@ describe('Test syndication feeds', () => {
216 expect(jsonObj.items[1].html_content).to.equal('super comment 1') 217 expect(jsonObj.items[1].html_content).to.equal('super comment 1')
217 } 218 }
218 }) 219 })
220
221 it('Should not list comments from muted accounts or instances', async function () {
222 await addAccountToServerBlocklist(servers[1].url, servers[1].accessToken, 'root@localhost:' + servers[0].port)
223
224 {
225 const json = await getJSONfeed(servers[1].url, 'video-comments', { version: 2 })
226 const jsonObj = JSON.parse(json.text)
227 expect(jsonObj.items.length).to.be.equal(0)
228 }
229
230 })
219 }) 231 })
220 232
221 after(async function () { 233 after(async function () {