diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2019-01-29 17:34:43 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-01-29 17:34:43 +0900 |
| commit | 2ed9e26a4fc6ece9b510538ac6c48a62eb8536d1 (patch) | |
| tree | bbefc668c1b611d1ad083bf7fed49381ed70ce14 /test | |
| parent | Sort tasks by topological ordering (diff) | |
| download | sharkey-2ed9e26a4fc6ece9b510538ac6c48a62eb8536d1.tar.gz sharkey-2ed9e26a4fc6ece9b510538ac6c48a62eb8536d1.tar.bz2 sharkey-2ed9e26a4fc6ece9b510538ac6c48a62eb8536d1.zip | |
リプライ/メンションされていれば非フォロワーへのフォロワー限定でも参照可能に (#4033)
* 非メンション/リプライ投稿がmentionsにあるかどうかはvisibilityと関係ないので削除
* リプライ/メンションされていれば非フォロワーでも参照可能に
Diffstat (limited to 'test')
| -rw-r--r-- | test/api-visibility.ts | 61 |
1 files changed, 20 insertions, 41 deletions
diff --git a/test/api-visibility.ts b/test/api-visibility.ts index 56e72f7cab..8380d54f1d 100644 --- a/test/api-visibility.ts +++ b/test/api-visibility.ts @@ -302,9 +302,9 @@ describe('API visibility', () => { expect(res.body).have.property('text').eql('x'); })); - it('[show] followers-replyを非フォロワーはリプライされていても見れない', async(async () => { + it('[show] followers-replyを非フォロワーでもリプライされていれば見れる', async(async () => { const res = await show(folR.id, target); - expect(res.body).have.property('isHidden').eql(true); + expect(res.body).have.property('text').eql('x'); })); it('[show] followers-replyをフォロワーが見れる', async(async () => { @@ -434,9 +434,9 @@ describe('API visibility', () => { expect(res.body).have.property('text').eql('@target x'); })); - it('[show] followers-mentionを非フォロワーはメンションされていても見れない', async(async () => { + it('[show] followers-mentionを非フォロワーでもメンションされていれば見れる', async(async () => { const res = await show(folM.id, target); - expect(res.body).have.property('isHidden').eql(true); + expect(res.body).have.property('text').eql('@target x'); })); it('[show] followers-mentionをフォロワーが見れる', async(async () => { @@ -531,62 +531,41 @@ describe('API visibility', () => { //#endregion //#region RTL - it('[RTL] followers-reply が 非フォロワー (リプライ先ではない) から見れない', async(async () => { - const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, other); + it('[replies] followers-reply が フォロワーから見れる', async(async () => { + const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, follower); expect(res).have.status(200); const notes = res.body.filter((n: any) => n.id == folR.id); - expect(notes).length(0); + expect(notes[0]).have.property('text').eql('x'); })); - it('[RTL] followers-reply が 非フォロワー (リプライ先である) から見れない', async(async () => { - const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, target); + it('[replies] followers-reply が 非フォロワー (リプライ先ではない) から見れない', async(async () => { + const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, other); expect(res).have.status(200); const notes = res.body.filter((n: any) => n.id == folR.id); expect(notes).length(0); })); - //#endregion - - //#region MTL - it('[MTL] public-reply が 非フォロワー (リプライ先ではない) から見れる', async(async () => { - const res = await request('/notes/mentions', { noteId: tgt.id, limit: 100 }, other); - expect(res).have.status(200); - const notes = res.body.filter((n: any) => n.id == pubR.id); - expect(notes).length(0); - })); - it('[MTL] followers-reply が 非フォロワー (リプライ先ではない) から見れない', async(async () => { - const res = await request('/notes/mentions', { noteId: tgt.id, limit: 100 }, other); + it('[replies] followers-reply が 非フォロワー (リプライ先である) から見れる', async(async () => { + const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, target); expect(res).have.status(200); const notes = res.body.filter((n: any) => n.id == folR.id); - expect(notes).length(0); + expect(notes[0]).have.property('text').eql('x'); })); + //#endregion - it('[MTL] followers-reply が 非フォロワー (リプライ先である) から見れない', async(async () => { - const res = await request('/notes/mentions', { noteId: tgt.id, limit: 100 }, target); + //#region MTL + it('[mentions] followers-reply が 非フォロワー (リプライ先である) から見れる', async(async () => { + const res = await request('/notes/mentions', { limit: 100 }, target); expect(res).have.status(200); const notes = res.body.filter((n: any) => n.id == folR.id); - expect(notes).length(0); - })); - - it('[MTL] public-mention が 非フォロワー (メンション先ではない) から見れる', async(async () => { - const res = await request('/notes/mentions', { noteId: tgt.id, limit: 100 }, other); - expect(res).have.status(200); - const notes = res.body.filter((n: any) => n.id == pubM.id); - expect(notes).length(0); - })); - - it('[MTL] followers-mention が 非フォロワー (メンション先ではない) から見れない', async(async () => { - const res = await request('/notes/mentions', { noteId: tgt.id, limit: 100 }, other); - expect(res).have.status(200); - const notes = res.body.filter((n: any) => n.id == folM.id); - expect(notes).length(0); + expect(notes[0]).have.property('text').eql('x'); })); - it('[MTL] followers-reply が 非フォロワー (メンション先である) から見れない', async(async () => { - const res = await request('/notes/mentions', { noteId: tgt.id, limit: 100 }, target); + it('[mentions] followers-mention が 非フォロワー (メンション先である) から見れる', async(async () => { + const res = await request('/notes/mentions', { limit: 100 }, target); expect(res).have.status(200); const notes = res.body.filter((n: any) => n.id == folM.id); - expect(notes).length(0); + expect(notes[0]).have.property('text').eql('@target x'); })); //#endregion }); |