From 1df8a4d79a491d2ad5bdd9329f37e52cba21238c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 6 May 2020 14:12:12 +0200 Subject: Fix comments feed with musted accounts --- server/tests/feeds/feeds.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'server/tests/feeds') 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- import { waitJobs } from '../../../shared/extra-utils/server/jobs' import { User } from '../../../shared/models/users' import { VideoPrivacy } from '@shared/models' +import { addAccountToServerBlocklist } from '@shared/extra-utils/users/blocklist' chai.use(require('chai-xml')) chai.use(require('chai-json-schema')) @@ -216,6 +217,17 @@ describe('Test syndication feeds', () => { expect(jsonObj.items[1].html_content).to.equal('super comment 1') } }) + + it('Should not list comments from muted accounts or instances', async function () { + await addAccountToServerBlocklist(servers[1].url, servers[1].accessToken, 'root@localhost:' + servers[0].port) + + { + const json = await getJSONfeed(servers[1].url, 'video-comments', { version: 2 }) + const jsonObj = JSON.parse(json.text) + expect(jsonObj.items.length).to.be.equal(0) + } + + }) }) after(async function () { -- cgit v1.2.3