Email subscription params in request body

fix tests
This commit is contained in:
Eugene Orlov
2023-06-29 10:52:36 -05:00
committed by Umputun
parent 6410e3be85
commit 33a6d6da97
@@ -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),
});
});