diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-19 10:48:50 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-29 09:21:26 +0200 |
commit | 8adf0a767f0816465ac3a8f4a6c63f53dd05fe3d (patch) | |
tree | 6633e5e17a2c64d670aab2a7bcf9b46f76cea32f /server/tests | |
parent | 923ff87da2761fd88a8ca269ac1ef403abb583d2 (diff) | |
download | PeerTube-8adf0a767f0816465ac3a8f4a6c63f53dd05fe3d.tar.gz PeerTube-8adf0a767f0816465ac3a8f4a6c63f53dd05fe3d.tar.zst PeerTube-8adf0a767f0816465ac3a8f4a6c63f53dd05fe3d.zip |
Fix comments deleted display
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/users/blocklist.ts | 8 |
1 files changed, 5 insertions, 3 deletions
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 () { | |||
195 | }) | 195 | }) |
196 | 196 | ||
197 | it('Should hide its comments', async function () { | 197 | it('Should hide its comments', async function () { |
198 | const resThreads = await getVideoCommentThreads(servers[0].url, videoUUID1, 0, 5, '-createdAt', servers[0].accessToken) | 198 | const resThreads = await getVideoCommentThreads(servers[0].url, videoUUID1, 0, 25, '-createdAt', servers[0].accessToken) |
199 | 199 | ||
200 | const threads: VideoComment[] = resThreads.body.data | 200 | const threads: VideoComment[] = resThreads.body.data |
201 | expect(threads).to.have.lengthOf(1) | 201 | expect(threads).to.have.lengthOf(1) |
@@ -467,9 +467,11 @@ describe('Test blocklist', function () { | |||
467 | 467 | ||
468 | it('Should hide its comments', async function () { | 468 | it('Should hide its comments', async function () { |
469 | for (const token of [ userModeratorToken, servers[0].accessToken ]) { | 469 | for (const token of [ userModeratorToken, servers[0].accessToken ]) { |
470 | const resThreads = await getVideoCommentThreads(servers[0].url, videoUUID1, 0, 5, '-createdAt', token) | 470 | const resThreads = await getVideoCommentThreads(servers[0].url, videoUUID1, 0, 20, '-createdAt', token) |
471 | |||
472 | let threads: VideoComment[] = resThreads.body.data | ||
473 | threads = threads.filter(t => t.isDeleted === false) | ||
471 | 474 | ||
472 | const threads: VideoComment[] = resThreads.body.data | ||
473 | expect(threads).to.have.lengthOf(1) | 475 | expect(threads).to.have.lengthOf(1) |
474 | expect(threads[0].totalReplies).to.equal(0) | 476 | expect(threads[0].totalReplies).to.equal(0) |
475 | 477 | ||