From 3c7ddd7daa61d35c6fd0a992389a92599a246779 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 15 Apr 2022 14:19:07 +0200 Subject: Fix email links displayed twice as text --- server/tests/api/server/contact-form.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'server/tests/api') diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts index f3facb04a..4f01f6fd5 100644 --- a/server/tests/api/server/contact-form.ts +++ b/server/tests/api/server/contact-form.ts @@ -61,6 +61,13 @@ describe('Test contact form', function () { expect(email['text']).contains('my super message') }) + it('Should not have duplicated email adress in text message', async function () { + const text = emails[0]['text'] as string + + const matches = text.match(/toto@example.com/g) + expect(matches).to.have.lengthOf(1) + }) + it('Should not be able to send another contact form because of the anti spam checker', async function () { this.timeout(10000) -- cgit v1.2.3