Skip to content

Commit

Permalink
add more test
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Oct 4, 2023
1 parent ee70f05 commit 05d1f5e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/backend/test/e2e/timelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,19 @@ describe('Timelines', () => {
assert.strictEqual(res.body.some((note: any) => note.id === bobNote1.id), false);
assert.strictEqual(res.body.some((note: any) => note.id === bobNote2.id), true);
}, 1000 * 10);

test.concurrent('ミュートしていても userId に指定したユーザーの投稿が含まれる', async () => {
const [alice, bob] = await Promise.all([signup(), signup()]);

await api('/mute/create', { userId: bob.id }, alice);
const bobNote = await post(bob, { text: 'hi' });

await sleep(100); // redisに追加されるのを待つ

const res = await api('/users/notes', { userId: bob.id }, alice);

assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), true);
});
});

// TODO: リノートミュート済みユーザーのテスト
Expand Down

0 comments on commit 05d1f5e

Please sign in to comment.