diff --git a/server/services/comments/comments.hooks.js b/server/services/comments/comments.hooks.js index a6fdc5d..c12d207 100644 --- a/server/services/comments/comments.hooks.js +++ b/server/services/comments/comments.hooks.js @@ -124,6 +124,7 @@ module.exports = { data: { content: 'Comments of this blacklisted user are not visible.', contentExcerpt: 'Comments of this blacklisted user are not visible.', + isBlacklisted: true, hasMore: false } }) @@ -134,6 +135,7 @@ module.exports = { data: { content: 'Comments of this blacklisted user are not visible.', contentExcerpt: 'Comments of this blacklisted user are not visible.', + isBlacklisted: true, hasMore: false } }) diff --git a/test/services/comments.test.js b/test/services/comments.test.js index cb442fc..95e5c2b 100644 --- a/test/services/comments.test.js +++ b/test/services/comments.test.js @@ -136,6 +136,12 @@ describe('\'comments\' service', () => { assert.equal(comment.contentExcerpt, 'Comments of this blacklisted user are not visible.'); }); + it('sends isBlacklisted: true', async () => { + const comments = await service.find(params); + const comment = comments.data[1]; + assert.equal(comment.isBlacklisted, true); + }); + context('but if user is not authenticated', () => { it('is visible', async () => { const comments = await service.find();