|
@@ -279,6 +279,15 @@ describe('Thread and post', () => {
|
|
|
res.body.should.have.deep.property('User.username', 'username1')
|
|
|
res.body.should.have.deep.property('Thread.name', 'thread')
|
|
|
res.body.should.have.deep.property('ReplyingTo.User.username', 'username')
|
|
|
+ res.body.should.have.property('Replies', null)
|
|
|
+ })
|
|
|
+ it('should return any replies to a post', async () => {
|
|
|
+ let res = await replyAgent.get('/api/v1/post/1')
|
|
|
+
|
|
|
+ res.should.be.json
|
|
|
+ res.should.have.status(200)
|
|
|
+ res.body.should.have.deep.property('ReplyingTo', null)
|
|
|
+ res.body.should.have.deep.property('Replies.0.content', '<p>another post</p>\n')
|
|
|
})
|
|
|
it('should return an error if reply id does not exist', async () => {
|
|
|
try {
|