diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-02-27 14:14:27 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-02-27 14:14:27 +0900 |
| commit | 079425c027e693a2fce40fb70783c66da4952e63 (patch) | |
| tree | 1bca7856868aee231a63a36debeed1231bc32bc4 | |
| parent | fix (diff) | |
| download | misskey-079425c027e693a2fce40fb70783c66da4952e63.tar.gz misskey-079425c027e693a2fce40fb70783c66da4952e63.tar.bz2 misskey-079425c027e693a2fce40fb70783c66da4952e63.zip | |
improve test
| -rw-r--r-- | packages/backend/test/endpoints.ts | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/packages/backend/test/endpoints.ts b/packages/backend/test/endpoints.ts index 1331cf77c3..2aedc25f2c 100644 --- a/packages/backend/test/endpoints.ts +++ b/packages/backend/test/endpoints.ts @@ -223,10 +223,17 @@ describe('API: Endpoints', () => { const alice = await signup({ username: 'alice' }); const res = await request('/notes/reactions/create', { noteId: bobPost.id, - reaction: '๐', + reaction: '๐', }, alice); assert.strictEqual(res.status, 204); + + const resNote = await request('/notes/show', { + noteId: bobPost.id, + }, alice); + + assert.strictEqual(resNote.status, 200); + assert.strictEqual(resNote.body.reactions['๐'], [alice.id]); })); it('่ชๅใฎๆ็จฟใซใใชใขใฏใทใงใณใงใใ', async(async () => { @@ -234,7 +241,7 @@ describe('API: Endpoints', () => { const res = await request('/notes/reactions/create', { noteId: myPost.id, - reaction: '๐', + reaction: '๐', }, alice); assert.strictEqual(res.status, 204); @@ -247,7 +254,7 @@ describe('API: Endpoints', () => { const res = await request('/notes/reactions/create', { noteId: bobPost.id, - reaction: '๐', + reaction: '๐', }, alice); assert.strictEqual(res.status, 400); @@ -256,7 +263,7 @@ describe('API: Endpoints', () => { it('ๅญๅจใใชใๆ็จฟใซใฏใชใขใฏใทใงใณใงใใชใ', async(async () => { const res = await request('/notes/reactions/create', { noteId: '000000000000000000000000', - reaction: '๐', + reaction: '๐', }, alice); assert.strictEqual(res.status, 400); @@ -271,7 +278,7 @@ describe('API: Endpoints', () => { it('้้ใฃใIDใงๆใใใ', async(async () => { const res = await request('/notes/reactions/create', { noteId: 'kyoppie', - reaction: '๐', + reaction: '๐', }, alice); assert.strictEqual(res.status, 400); |