From 6849b218810b8debd0b1ba71f7f3ed23a118ee5d Mon Sep 17 00:00:00 2001 From: atsu1125 Date: Sun, 27 Oct 2024 18:39:58 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=E5=AD=98=E5=9C=A8=E3=81=97=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=81=8B=E4=BB=96=E4=BA=BA=E3=81=AE=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=81=AF=E6=80=92=E3=82=89=E3=82=8C=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/note.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/note.ts b/test/note.ts index 31aaf00da6..48c76b9e8f 100644 --- a/test/note.ts +++ b/test/note.ts @@ -58,7 +58,7 @@ describe('Note', () => { assert.deepStrictEqual(res.body.createdNote.fileIds, [file.id]); })); - it('他人のファイルは無視', async(async () => { + it('他人のファイルは怒られる', async(async () => { const file = await uploadFile(bob); const res = await request('/notes/create', { @@ -66,20 +66,16 @@ describe('Note', () => { fileIds: [file.id] }, alice); - assert.strictEqual(res.status, 200); - assert.strictEqual(typeof res.body === 'object' && !Array.isArray(res.body), true); - assert.deepStrictEqual(res.body.createdNote.fileIds, []); + assert.strictEqual(res.status, 400); })); - it('存在しないファイルは無視', async(async () => { + it('存在しないファイルは怒られる', async(async () => { const res = await request('/notes/create', { text: 'test', fileIds: ['000000000000000000000000'] }, alice); - assert.strictEqual(res.status, 200); - assert.strictEqual(typeof res.body === 'object' && !Array.isArray(res.body), true); - assert.deepStrictEqual(res.body.createdNote.fileIds, []); + assert.strictEqual(res.status, 400); })); it('不正なファイルIDで怒られる', async(async () => {