From 8adf0a767f0816465ac3a8f4a6c63f53dd05fe3d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 19 May 2020 10:48:50 +0200 Subject: Fix comments deleted display --- server/tests/api/users/blocklist.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/users/blocklist.ts b/server/tests/api/users/blocklist.ts index 21b9ae4f8..e37dbb5a4 100644 --- a/server/tests/api/users/blocklist.ts +++ b/server/tests/api/users/blocklist.ts @@ -195,7 +195,7 @@ describe('Test blocklist', function () { }) it('Should hide its comments', async function () { - const resThreads = await getVideoCommentThreads(servers[0].url, videoUUID1, 0, 5, '-createdAt', servers[0].accessToken) + const resThreads = await getVideoCommentThreads(servers[0].url, videoUUID1, 0, 25, '-createdAt', servers[0].accessToken) const threads: VideoComment[] = resThreads.body.data expect(threads).to.have.lengthOf(1) @@ -467,9 +467,11 @@ describe('Test blocklist', function () { it('Should hide its comments', async function () { for (const token of [ userModeratorToken, servers[0].accessToken ]) { - const resThreads = await getVideoCommentThreads(servers[0].url, videoUUID1, 0, 5, '-createdAt', token) + const resThreads = await getVideoCommentThreads(servers[0].url, videoUUID1, 0, 20, '-createdAt', token) + + let threads: VideoComment[] = resThreads.body.data + threads = threads.filter(t => t.isDeleted === false) - const threads: VideoComment[] = resThreads.body.data expect(threads).to.have.lengthOf(1) expect(threads[0].totalReplies).to.equal(0) -- cgit v1.2.3