From 9afb5c10e5935e667e33219bdbd775e9ed1b4330 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Nov 2020 14:24:55 +0100 Subject: Add email markdown tests --- .../api/notifications/comments-notifications.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/server/tests/api/notifications/comments-notifications.ts b/server/tests/api/notifications/comments-notifications.ts index dfe846cc4..fd009e9d9 100644 --- a/server/tests/api/notifications/comments-notifications.ts +++ b/server/tests/api/notifications/comments-notifications.ts @@ -165,6 +165,28 @@ describe('Test comments notifications', function () { await checkNewCommentOnMyVideo(baseParams, uuid, commentId, threadId, 'presence') }) + + it('Should convert markdown in comment to html', async function () { + this.timeout(10000) + + const resVideo = await uploadVideo(servers[0].url, userAccessToken, { name: 'cool video' }) + const uuid = resVideo.body.video.uuid + + const commentText = '**hello** world,

what do you think about peertube?

' + const resComment = await addVideoCommentThread(servers[0].url, servers[0].accessToken, uuid, commentText) + const commentId = resComment.body.comment.id + + await waitJobs(servers) + await checkNewCommentOnMyVideo(baseParams, uuid, commentId, commentId, 'presence') + + const latestEmail = emails[emails.length - 1] + + const expected = 'hello ' + + 'world,

what do you think about peertube?' + + expect(latestEmail['html']).to.contain(expected) + }) }) describe('Mention notifications', function () { -- cgit v1.2.3