aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/video-comments.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-27 20:03:37 +0100
committerChocobozzz <me@florianbigard.com>2017-12-27 20:03:37 +0100
commitd50acfab69ce9e05b272dea6c4d34d52960ba14c (patch)
tree55ce8b70777603b772d2cecb96cd71aac9ccfb9c /server/tests/api/video-comments.ts
parentae45f988bb5ea32152cca02a282d02599dbb633b (diff)
downloadPeerTube-d50acfab69ce9e05b272dea6c4d34d52960ba14c.tar.gz
PeerTube-d50acfab69ce9e05b272dea6c4d34d52960ba14c.tar.zst
PeerTube-d50acfab69ce9e05b272dea6c4d34d52960ba14c.zip
Add comments federation tests
Diffstat (limited to 'server/tests/api/video-comments.ts')
-rw-r--r--server/tests/api/video-comments.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/tests/api/video-comments.ts b/server/tests/api/video-comments.ts
index 2c7d1c6e2..f05ca5e81 100644
--- a/server/tests/api/video-comments.ts
+++ b/server/tests/api/video-comments.ts
@@ -40,7 +40,7 @@ describe('Test video comments', function () {
40 const text = 'my super first comment' 40 const text = 'my super first comment'
41 41
42 const res = await addVideoCommentThread(server.url, server.accessToken, videoUUID, text) 42 const res = await addVideoCommentThread(server.url, server.accessToken, videoUUID, text)
43 const comment = res.body 43 const comment = res.body.comment
44 44
45 expect(comment.inReplyToCommentId).to.be.null 45 expect(comment.inReplyToCommentId).to.be.null
46 expect(comment.text).equal('my super first comment') 46 expect(comment.text).equal('my super first comment')
@@ -133,9 +133,9 @@ describe('Test video comments', function () {
133 expect(res.body.data).to.have.lengthOf(3) 133 expect(res.body.data).to.have.lengthOf(3)
134 134
135 expect(res.body.data[0].text).to.equal('my super first comment') 135 expect(res.body.data[0].text).to.equal('my super first comment')
136 expect(res.body.data[0].totalReplies).to.equal(2) 136 expect(res.body.data[0].totalReplies).to.equal(3)
137 expect(res.body.data[1].text).to.equal('super thread 2') 137 expect(res.body.data[1].text).to.equal('super thread 2')
138 expect(res.body.data[1].totalReplies).to.equal(1) 138 expect(res.body.data[1].totalReplies).to.equal(0)
139 expect(res.body.data[2].text).to.equal('super thread 3') 139 expect(res.body.data[2].text).to.equal('super thread 3')
140 expect(res.body.data[2].totalReplies).to.equal(0) 140 expect(res.body.data[2].totalReplies).to.equal(0)
141 }) 141 })