From 5dd8c689fe198675877fd7032c2cba9ec5b6c4b3 Mon Sep 17 00:00:00 2001 From: zyoshoka Date: Fri, 12 Jan 2024 15:50:03 +0900 Subject: [PATCH] =?UTF-8?q?test(backend):=20=E5=BC=95=E7=94=A8renote?= =?UTF-8?q?=E3=81=A7=E7=A9=BA=E7=99=BD=E6=96=87=E5=AD=97=E3=81=AE=E3=81=BF?= =?UTF-8?q?=E3=81=A7=E6=A7=8B=E6=88=90=E3=81=95=E3=82=8C=E3=81=9Ftext?= =?UTF-8?q?=E3=81=AB=E3=81=99=E3=82=8B=E3=81=A8=E3=83=AC=E3=82=B9=E3=83=9D?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=81=8C`text:=20null`=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E3=81=93=E3=81=A8=E3=82=92=E3=83=81=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=81=99=E3=82=8B=E3=83=86=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/test/e2e/note.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/backend/test/e2e/note.ts b/packages/backend/test/e2e/note.ts index 0f2e08e675..0280b051f5 100644 --- a/packages/backend/test/e2e/note.ts +++ b/packages/backend/test/e2e/note.ts @@ -136,6 +136,19 @@ describe('Note', () => { assert.strictEqual(res.body.createdNote.renote.text, bobPost.text); }); + test('引用renoteで空白文字のみで構成されたtextにするとレスポンスがtext: nullになる', async () => { + const bobPost = await post(bob, { + text: 'test', + }); + const res = await api('/notes/create', { + text: ' ', + renoteId: bobPost.id, + }, alice); + + assert.strictEqual(res.status, 200); + assert.strictEqual(res.body.createdNote.text, null); + }); + test('visibility: followersでrenoteできる', async () => { const createRes = await api('/notes/create', { text: 'test',