From e0d4353d98b4bc11f440aff8ea8bd26b2ee30e46 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Fri, 25 Oct 2019 20:24:00 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=81=8C=E3=83=90=E3=82=B0=E3=81=A3=E3=81=A6=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/api-visibility.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/api-visibility.ts b/test/api-visibility.ts index 3de936658e..47b222b165 100644 --- a/test/api-visibility.ts +++ b/test/api-visibility.ts @@ -37,6 +37,8 @@ describe('API visibility', () => { let other: any; /** 非フォロワーでもリプライやメンションをされた人 */ let target: any; + /** specified mentionでmentionを飛ばされる人 */ + let target2: any; /** public-post */ let pub: any; @@ -82,6 +84,7 @@ describe('API visibility', () => { follower = await signup({ username: 'follower' }); other = await signup({ username: 'other' }); target = await signup({ username: 'target' }); + target2 = await signup({ username: 'target2' }); // follow alice <= follower await request('/following/create', { userId: alice.id }, follower); @@ -103,7 +106,7 @@ describe('API visibility', () => { pubM = await post(alice, { text: '@target x', replyId: tgt.id, visibility: 'public' }); homeM = await post(alice, { text: '@target x', replyId: tgt.id, visibility: 'home' }); folM = await post(alice, { text: '@target x', replyId: tgt.id, visibility: 'followers' }); - speM = await post(alice, { text: '@target x', replyId: tgt.id, visibility: 'specified' }); + speM = await post(alice, { text: '@target2 x', replyId: tgt.id, visibility: 'specified' }); //#endregion }); @@ -391,16 +394,16 @@ describe('API visibility', () => { // specified it('[show] specified-mentionを自分が見れる', async(async () => { const res = await show(speM.id, alice); - assert.strictEqual(res.body.text, '@target x'); + assert.strictEqual(res.body.text, '@target2 x'); })); it('[show] specified-mentionを指定ユーザーが見れる', async(async () => { const res = await show(speM.id, target); - assert.strictEqual(res.body.text, '@target x'); + assert.strictEqual(res.body.text, '@target2 x'); })); it('[show] specified-mentionをされた人が指定されてなかったら見れない', async(async () => { - const res = await show(speM.id, target); + const res = await show(speM.id, target2); assert.strictEqual(res.body.isHidden, true); }));