summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-01-25 10:58:39 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-01-25 10:58:39 +0900
commit76fcf122f99758a0a95b787f6b0e401f05341101 (patch)
tree49adc06ebcb578eeb5b99c07d0bffb3a10a00147 /test
parent[Test] Add API test (diff)
downloadmisskey-76fcf122f99758a0a95b787f6b0e401f05341101.tar.gz
misskey-76fcf122f99758a0a95b787f6b0e401f05341101.tar.bz2
misskey-76fcf122f99758a0a95b787f6b0e401f05341101.zip
[Test] Add notes/timeline test
Diffstat (limited to 'test')
-rw-r--r--test/api.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/api.ts b/test/api.ts
index 30ff32e3d4..67edf3dfc7 100644
--- a/test/api.ts
+++ b/test/api.ts
@@ -1198,4 +1198,27 @@ describe('API', () => {
expect(res.body).length(0);
}));
});
+
+ describe('notes/timeline', () => {
+ it('フォロワー限定投稿が含まれる', async(async () => {
+ const alice = await signup({ username: 'alice' });
+ const bob = await signup({ username: 'bob' });
+
+ await request('/following/create', {
+ userId: alice.id
+ }, bob);
+
+ const alicePost = await post(alice, {
+ text: 'foo',
+ visibility: 'followers'
+ });
+
+ const res = await request('/notes/timeline', {}, bob);
+
+ expect(res).have.status(200);
+ expect(res.body).be.a('array');
+ expect(res.body).length(1);
+ expect(res.body[0].id).equals(alicePost.id);
+ }));
+ });
});