aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-01-12 11:11:30 +0100
committerChocobozzz <me@florianbigard.com>2023-01-12 11:11:41 +0100
commit0b96a0fb77cee07abac185fb1fb704388498631b (patch)
tree5aa81598d5a1a32646c7c7af66be6e169a79d949 /server/tests/api
parent3f3530c3dbc5339b4cba53710b8568b4ad39152e (diff)
downloadPeerTube-0b96a0fb77cee07abac185fb1fb704388498631b.tar.gz
PeerTube-0b96a0fb77cee07abac185fb1fb704388498631b.tar.zst
PeerTube-0b96a0fb77cee07abac185fb1fb704388498631b.zip
Optimize again comments list sql query
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/videos/video-comments.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts
index e077cbf73..e35500b0b 100644
--- a/server/tests/api/videos/video-comments.ts
+++ b/server/tests/api/videos/video-comments.ts
@@ -169,6 +169,13 @@ describe('Test video comments', function () {
169 expect(body.data[2].totalReplies).to.equal(0) 169 expect(body.data[2].totalReplies).to.equal(0)
170 }) 170 })
171 171
172 it('Should list the and sort them by total replies', async function () {
173 const body = await command.listThreads({ videoId: videoUUID, sort: 'totalReplies' })
174
175 expect(body.data[2].text).to.equal('my super first comment')
176 expect(body.data[2].totalReplies).to.equal(3)
177 })
178
172 it('Should delete a reply', async function () { 179 it('Should delete a reply', async function () {
173 await command.delete({ videoId, commentId: replyToDeleteId }) 180 await command.delete({ videoId, commentId: replyToDeleteId })
174 181