From 33a6d6da9783e8cb37cfe3201bcc9574a7eb39de Mon Sep 17 00:00:00 2001 From: Eugene Orlov Date: Sat, 24 Jun 2023 23:53:42 +0200 Subject: [PATCH] Email subscription params in request body fix tests --- frontend/apps/remark42/app/common/fetcher.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/apps/remark42/app/common/fetcher.test.ts b/frontend/apps/remark42/app/common/fetcher.test.ts index b6c4a470..336f1cb3 100644 --- a/frontend/apps/remark42/app/common/fetcher.test.ts +++ b/frontend/apps/remark42/app/common/fetcher.test.ts @@ -132,6 +132,7 @@ describe('fetcher', () => { expect.assertions(1); const data = { text: 'text' }; + const dataShouldBe = { ...data, site: 'remark' }; const headersWithContentType = { ...headers, 'Content-Type': 'application/json' }; mockFetch(); @@ -140,7 +141,7 @@ describe('fetcher', () => { expect(window.fetch).toBeCalledWith(apiUrl, { method: 'post', headers: headersWithContentType, - body: JSON.stringify(data), + body: JSON.stringify(dataShouldBe), }); });