From e7e34f34b0b3afa744742b5c4495531bca3c3906 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 20 Sep 2023 18:08:00 +0530 Subject: [PATCH] test: add more signature cases --- .../dashboard/helper/specs/editorHelper.spec.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/javascript/dashboard/helper/specs/editorHelper.spec.js b/app/javascript/dashboard/helper/specs/editorHelper.spec.js index 0c40a74d8..1851dfbd6 100644 --- a/app/javascript/dashboard/helper/specs/editorHelper.spec.js +++ b/app/javascript/dashboard/helper/specs/editorHelper.spec.js @@ -18,10 +18,14 @@ const DOES_NOT_HAVE_SIGNATURE = { body: 'This is a test\n\n--\n\nThis is a signature\n\nThis is more text', signature: 'This is a signature', }, - signature_has_images: { + 'signature has images': { body: 'This is a test', signature: - 'Testing\n![](http://localhost:3000/rails/active_storage/blobs/redirect/some-hash/image.png)', + 'Testing \n![](http://localhost:3000/rails/active_storage/blobs/redirect/some-hash/image.png)', + }, + 'signature has non commonmark syntax': { + body: 'This is a test', + signature: '- Shivam', }, }; @@ -38,6 +42,10 @@ const HAS_SIGNATURE = { body: '\n\n--\n\nThis is a signature', signature: 'This is a signature', }, + 'signature has non-commonmark syntax': { + body: '\n\n--\n\n* Signature', + signature: '- Signature', + }, }; describe('findSignatureInBody', () => {