mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 04:43:08 +02:00
add more test
This commit is contained in:
parent
a997b7bdcc
commit
fb6a5c8356
1 changed files with 15 additions and 0 deletions
|
@ -770,6 +770,21 @@ describe('Timelines', () => {
|
|||
assert.strictEqual(res.body.some((note: any) => note.id === bobNote2.id), true);
|
||||
});
|
||||
|
||||
test.concurrent('[withReplies: true] 他人への visibility: specified な返信が含まれない', async () => {
|
||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||
|
||||
const carolNote = await post(carol, { text: 'hi' });
|
||||
const bobNote1 = await post(bob, { text: 'hi' });
|
||||
const bobNote2 = await post(bob, { text: 'hi', replyId: carolNote.id, visibility: 'specified' });
|
||||
|
||||
await sleep(100); // redisに追加されるのを待つ
|
||||
|
||||
const res = await api('/users/notes', { userId: bob.id, withReplies: true }, alice);
|
||||
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === bobNote1.id), true);
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === bobNote2.id), false);
|
||||
});
|
||||
|
||||
test.concurrent('[withFiles: true] ファイル付きノートのみ含まれる', async () => {
|
||||
const [alice, bob] = await Promise.all([signup(), signup()]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue