summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-02-27 14:14:27 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-02-27 14:14:27 +0900
commit079425c027e693a2fce40fb70783c66da4952e63 (patch)
tree1bca7856868aee231a63a36debeed1231bc32bc4
parentfix (diff)
downloadmisskey-079425c027e693a2fce40fb70783c66da4952e63.tar.gz
misskey-079425c027e693a2fce40fb70783c66da4952e63.tar.bz2
misskey-079425c027e693a2fce40fb70783c66da4952e63.zip
improve test
-rw-r--r--packages/backend/test/endpoints.ts17
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);