Skip to content
Snippets Groups Projects
Commit 683b71fc authored by syuilo's avatar syuilo
Browse files

add timeline tests

parent 216b20d2
No related branches found
No related tags found
No related merge requests found
......@@ -115,6 +115,16 @@ describe('Streaming', () => {
assert.strictEqual(fired, true);
});
test('自分の visibility: followers な投稿が流れる', async () => {
const fired = await waitFire(
ayano, 'homeTimeline', // ayano:Home
() => api('notes/create', { text: 'foo', visibility: 'followers' }, ayano), // ayano posts
msg => msg.type === 'note' && msg.body.text === 'foo',
);
assert.strictEqual(fired, true);
});
test('フォローしているユーザーの投稿が流れる', async () => {
const fired = await waitFire(
ayano, 'homeTimeline', // ayano:home
......@@ -125,6 +135,16 @@ describe('Streaming', () => {
assert.strictEqual(fired, true);
});
test('フォローしているユーザーの visibility: followers な投稿が流れる', async () => {
const fired = await waitFire(
ayano, 'homeTimeline', // ayano:home
() => api('notes/create', { text: 'foo', visibility: 'followers' }, kyoko), // kyoko posts
msg => msg.type === 'note' && msg.body.userId === kyoko.id, // wait kyoko
);
assert.strictEqual(fired, true);
});
test('フォローしていないユーザーの投稿は流れない', async () => {
const fired = await waitFire(
kyoko, 'homeTimeline', // kyoko:home
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment