tests: translate some japanese to english

This commit is contained in:
Johann150 2023-05-07 23:37:47 +02:00
parent 3d4df807b0
commit d8c2cc2ef0
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 81 additions and 81 deletions

View file

@ -17,15 +17,15 @@ describe('API visibility', () => {
describe('Note visibility', async () => { describe('Note visibility', async () => {
//#region vars //#region vars
/** ヒロイン */ /** protagonist */
let alice: any; let alice: any;
/** フォロワー */ /** follower */
let follower: any; let follower: any;
/** 非フォロワー */ /** non-follower */
let other: any; let other: any;
/** 非フォロワーでもリプライやメンションをされた人 */ /** non-follower who has been replied to or mentioned */
let target: any; let target: any;
/** specified mentionでmentionを飛ばされる人 */ /** actor for which a specified visibility was set */
let target2: any; let target2: any;
/** public-post */ /** public-post */
@ -100,90 +100,90 @@ describe('API visibility', () => {
//#region show post //#region show post
// public // public
it('[show] public-postを自分が見れる', async(async () => { it('[show] public post can be seen by author', async(async () => {
const res = await show(pub.id, alice); const res = await show(pub.id, alice);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] public-postをフォロワーが見れる', async(async () => { it('[show] public post can be seen by follower', async(async () => {
const res = await show(pub.id, follower); const res = await show(pub.id, follower);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] public-postを非フォロワーが見れる', async(async () => { it('[show] public post can be seen by non-follower', async(async () => {
const res = await show(pub.id, other); const res = await show(pub.id, other);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] public-postを未認証が見れる', async(async () => { it('[show] public post can be seen unauthenticated', async(async () => {
const res = await show(pub.id, null); const res = await show(pub.id, null);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
// home // home
it('[show] home-postを自分が見れる', async(async () => { it('[show] home post can be seen by author', async(async () => {
const res = await show(home.id, alice); const res = await show(home.id, alice);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] home-postをフォロワーが見れる', async(async () => { it('[show] home post can be seen by follower', async(async () => {
const res = await show(home.id, follower); const res = await show(home.id, follower);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] home-postを非フォロワーが見れる', async(async () => { it('[show] home post can be seen by non-follower', async(async () => {
const res = await show(home.id, other); const res = await show(home.id, other);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] home-postを未認証が見れる', async(async () => { it('[show] home post can be seen unauthenticated', async(async () => {
const res = await show(home.id, null); const res = await show(home.id, null);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
// followers // followers
it('[show] followers-postを自分が見れる', async(async () => { it('[show] followers post can be seen by author', async(async () => {
const res = await show(fol.id, alice); const res = await show(fol.id, alice);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] followers-postをフォロワーが見れる', async(async () => { it('[show] followers post can be seen by follower', async(async () => {
const res = await show(fol.id, follower); const res = await show(fol.id, follower);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] followers-postを非フォロワーが見れない', async(async () => { it('[show] followers post is hidden from non-follower', async(async () => {
const res = await show(fol.id, other); const res = await show(fol.id, other);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] followers-postを未認証が見れない', async(async () => { it('[show] followers post is hidden when unathenticated', async(async () => {
const res = await show(fol.id, null); const res = await show(fol.id, null);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
// specified // specified
it('[show] specified-postを自分が見れる', async(async () => { it('[show] specified post can be seen by author', async(async () => {
const res = await show(spe.id, alice); const res = await show(spe.id, alice);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] specified-postを指定ユーザーが見れる', async(async () => { it('[show] specified post can be seen by designated user', async(async () => {
const res = await show(spe.id, target); const res = await show(spe.id, target);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] specified-postをフォロワーが見れない', async(async () => { it('[show] specified post is hidden from non-specified follower', async(async () => {
const res = await show(spe.id, follower); const res = await show(spe.id, follower);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] specified-postを非フォロワーが見れない', async(async () => { it('[show] specified post is hidden from non-follower', async(async () => {
const res = await show(spe.id, other); const res = await show(spe.id, other);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] specified-postを未認証が見れない', async(async () => { it('[show] specified post is hidden when unauthenticated', async(async () => {
const res = await show(spe.id, null); const res = await show(spe.id, null);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
@ -191,90 +191,90 @@ describe('API visibility', () => {
//#region show reply //#region show reply
// public // public
it('[show] public-replyを自分が見れる', async(async () => { it('[show] public reply can be seen by author', async(async () => {
const res = await show(pubR.id, alice); const res = await show(pubR.id, alice);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] public-replyをされた人が見れる', async(async () => { it('[show] public reply can be seen by replied to author', async(async () => {
const res = await show(pubR.id, target); const res = await show(pubR.id, target);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] public-replyをフォロワーが見れる', async(async () => { it('[show] public reply can be seen by follower', async(async () => {
const res = await show(pubR.id, follower); const res = await show(pubR.id, follower);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] public-replyを非フォロワーが見れる', async(async () => { it('[show] public reply can be seen by non-follower', async(async () => {
const res = await show(pubR.id, other); const res = await show(pubR.id, other);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] public-replyを未認証が見れる', async(async () => { it('[show] public reply can be seen unauthenticated', async(async () => {
const res = await show(pubR.id, null); const res = await show(pubR.id, null);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
// home // home
it('[show] home-replyを自分が見れる', async(async () => { it('[show] home reply can be seen by author', async(async () => {
const res = await show(homeR.id, alice); const res = await show(homeR.id, alice);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] home-replyをされた人が見れる', async(async () => { it('[show] home reply can be seen by replied to author', async(async () => {
const res = await show(homeR.id, target); const res = await show(homeR.id, target);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] home-replyをフォロワーが見れる', async(async () => { it('[show] home reply can be seen by follower', async(async () => {
const res = await show(homeR.id, follower); const res = await show(homeR.id, follower);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] home-replyを非フォロワーが見れる', async(async () => { it('[show] home reply can be seen by non-follower', async(async () => {
const res = await show(homeR.id, other); const res = await show(homeR.id, other);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] home-replyを未認証が見れる', async(async () => { it('[show] home reply can be seen unauthenticated', async(async () => {
const res = await show(homeR.id, null); const res = await show(homeR.id, null);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
// followers // followers
it('[show] followers-replyを自分が見れる', async(async () => { it('[show] followers reply can be seen by author', async(async () => {
const res = await show(folR.id, alice); const res = await show(folR.id, alice);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] followers-replyを非フォロワーでもリプライされていれば見れる', async(async () => { it('[show] followers reply can be seen by replied to author', async(async () => {
const res = await show(folR.id, target); const res = await show(folR.id, target);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] followers-replyをフォロワーが見れる', async(async () => { it('[show] followers reply can be seen by follower', async(async () => {
const res = await show(folR.id, follower); const res = await show(folR.id, follower);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] followers-replyを非フォロワーが見れない', async(async () => { it('[show] followers reply is hidden from non-follower', async(async () => {
const res = await show(folR.id, other); const res = await show(folR.id, other);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] followers-replyを未認証が見れない', async(async () => { it('[show] followers reply is hidden when unauthenticated', async(async () => {
const res = await show(folR.id, null); const res = await show(folR.id, null);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
// specified // specified
it('[show] specified-replyを自分が見れる', async(async () => { it('[show] specified reply can be seen by author', async(async () => {
const res = await show(speR.id, alice); const res = await show(speR.id, alice);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] specified-replyを指定ユーザーが見れる', async(async () => { it('[show] specified reply can be seen by replied to user', async(async () => {
const res = await show(speR.id, target); const res = await show(speR.id, target);
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
@ -284,17 +284,17 @@ describe('API visibility', () => {
assert.strictEqual(res.body.text, 'x'); assert.strictEqual(res.body.text, 'x');
})); }));
it('[show] specified-replyをフォロワーが見れない', async(async () => { it('[show] specified reply is hidden from follower', async(async () => {
const res = await show(speR.id, follower); const res = await show(speR.id, follower);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] specified-replyを非フォロワーが見れない', async(async () => { it('[show] specified reply is hidden from non-follower', async(async () => {
const res = await show(speR.id, other); const res = await show(speR.id, other);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] specified-replyを未認証が見れない', async(async () => { it('[show] specified reply is hidden when unauthenticated', async(async () => {
const res = await show(speR.id, null); const res = await show(speR.id, null);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
@ -302,131 +302,131 @@ describe('API visibility', () => {
//#region show mention //#region show mention
// public // public
it('[show] public-mentionを自分が見れる', async(async () => { it('[show] public-mention can be seen by author', async(async () => {
const res = await show(pubM.id, alice); const res = await show(pubM.id, alice);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] public-mentionをされた人が見れる', async(async () => { it('[show] public mention can be seen by mentioned', async(async () => {
const res = await show(pubM.id, target); const res = await show(pubM.id, target);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] public-mentionをフォロワーが見れる', async(async () => { it('[show] public mention can be seen by follower', async(async () => {
const res = await show(pubM.id, follower); const res = await show(pubM.id, follower);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] public-mentionを非フォロワーが見れる', async(async () => { it('[show] public mention can be seen by non-follower', async(async () => {
const res = await show(pubM.id, other); const res = await show(pubM.id, other);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] public-mentionを未認証が見れる', async(async () => { it('[show] public mention can be seen unauthenticated', async(async () => {
const res = await show(pubM.id, null); const res = await show(pubM.id, null);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
// home // home
it('[show] home-mentionを自分が見れる', async(async () => { it('[show] home mention can be seen by author', async(async () => {
const res = await show(homeM.id, alice); const res = await show(homeM.id, alice);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] home-mentionをされた人が見れる', async(async () => { it('[show] home mention can be seen by mentioned', async(async () => {
const res = await show(homeM.id, target); const res = await show(homeM.id, target);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] home-mentionをフォロワーが見れる', async(async () => { it('[show] home mention can be seen by follower', async(async () => {
const res = await show(homeM.id, follower); const res = await show(homeM.id, follower);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] home-mentionを非フォロワーが見れる', async(async () => { it('[show] home mention can be seen by non-follower', async(async () => {
const res = await show(homeM.id, other); const res = await show(homeM.id, other);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] home-mentionを未認証が見れる', async(async () => { it('[show] home mention can be seen unauthenticated', async(async () => {
const res = await show(homeM.id, null); const res = await show(homeM.id, null);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
// followers // followers
it('[show] followers-mentionを自分が見れる', async(async () => { it('[show] followers mention can be seen by author', async(async () => {
const res = await show(folM.id, alice); const res = await show(folM.id, alice);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] followers-mentionをメンションされていれば非フォロワーでも見れる', async(async () => { it('[show] followers mention can be seen by non-follower mentioned', async(async () => {
const res = await show(folM.id, target); const res = await show(folM.id, target);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] followers-mentionをフォロワーが見れる', async(async () => { it('[show] followers mention can be seen by follower', async(async () => {
const res = await show(folM.id, follower); const res = await show(folM.id, follower);
assert.strictEqual(res.body.text, '@target x'); assert.strictEqual(res.body.text, '@target x');
})); }));
it('[show] followers-mentionを非フォロワーが見れない', async(async () => { it('[show] followers mention is hidden from non-follower', async(async () => {
const res = await show(folM.id, other); const res = await show(folM.id, other);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] followers-mentionを未認証が見れない', async(async () => { it('[show] followers mention is hidden when unauthenticated', async(async () => {
const res = await show(folM.id, null); const res = await show(folM.id, null);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
// specified // specified
it('[show] specified-mentionを自分が見れる', async(async () => { it('[show] specified mention can be seen by author', async(async () => {
const res = await show(speM.id, alice); const res = await show(speM.id, alice);
assert.strictEqual(res.body.text, '@target2 x'); assert.strictEqual(res.body.text, '@target2 x');
})); }));
it('[show] specified-mentionを指定ユーザーが見れる', async(async () => { it('[show] specified mention can be seen by specified actor', async(async () => {
const res = await show(speM.id, target); const res = await show(speM.id, target);
assert.strictEqual(res.body.text, '@target2 x'); assert.strictEqual(res.body.text, '@target2 x');
})); }));
it('[show] specified-mentionをされた人が指定されてなかったら見れない', async(async () => { it('[show] specified mention is hidden from mentioned but not specified actor', async(async () => {
const res = await show(speM.id, target2); const res = await show(speM.id, target2);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] specified-mentionをフォロワーが見れない', async(async () => { it('[show] specified mention is hidden from follower', async(async () => {
const res = await show(speM.id, follower); const res = await show(speM.id, follower);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] specified-mentionを非フォロワーが見れない', async(async () => { it('[show] specified mention is hidden from non-follower', async(async () => {
const res = await show(speM.id, other); const res = await show(speM.id, other);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
it('[show] specified-mentionを未認証が見れない', async(async () => { it('[show] specified mention is hidden when unauthenticated', async(async () => {
const res = await show(speM.id, null); const res = await show(speM.id, null);
assert.strictEqual(res.status, 404); assert.strictEqual(res.status, 404);
})); }));
//#endregion //#endregion
//#region HTL //#region Home Timeline
it('[HTL] public-post が 自分が見れる', async(async () => { it('[TL] public post on author home TL', async(async () => {
const res = await request('/notes/timeline', { limit: 100 }, alice); const res = await request('/notes/timeline', { limit: 100 }, alice);
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const notes = res.body.filter((n: any) => n.id == pub.id); const notes = res.body.filter((n: any) => n.id == pub.id);
assert.strictEqual(notes[0].text, 'x'); assert.strictEqual(notes[0].text, 'x');
})); }));
it('[HTL] public-post が 非フォロワーから見れない', async(async () => { it('[TL] public post absent from non-follower home TL', async(async () => {
const res = await request('/notes/timeline', { limit: 100 }, other); const res = await request('/notes/timeline', { limit: 100 }, other);
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const notes = res.body.filter((n: any) => n.id == pub.id); const notes = res.body.filter((n: any) => n.id == pub.id);
assert.strictEqual(notes.length, 0); assert.strictEqual(notes.length, 0);
})); }));
it('[HTL] followers-post が フォロワーから見れる', async(async () => { it('[TL] followers post on follower home TL', async(async () => {
const res = await request('/notes/timeline', { limit: 100 }, follower); const res = await request('/notes/timeline', { limit: 100 }, follower);
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const notes = res.body.filter((n: any) => n.id == fol.id); const notes = res.body.filter((n: any) => n.id == fol.id);
@ -434,22 +434,22 @@ describe('API visibility', () => {
})); }));
//#endregion //#endregion
//#region RTL //#region replies timeline
it('[replies] followers-reply が フォロワーから見れる', async(async () => { it('[TL] followers reply on follower reply TL', async(async () => {
const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, follower); const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, follower);
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const notes = res.body.filter((n: any) => n.id == folR.id); const notes = res.body.filter((n: any) => n.id == folR.id);
assert.strictEqual(notes[0].text, 'x'); assert.strictEqual(notes[0].text, 'x');
})); }));
it('[replies] followers-reply が 非フォロワー (リプライ先ではない) から見れない', async(async () => { it('[TL] followers reply absent from not replied to non-follower reply TL', async(async () => {
const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, other); const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, other);
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const notes = res.body.filter((n: any) => n.id == folR.id); const notes = res.body.filter((n: any) => n.id == folR.id);
assert.strictEqual(notes.length, 0); assert.strictEqual(notes.length, 0);
})); }));
it('[replies] followers-reply が 非フォロワー (リプライ先である) から見れる', async(async () => { it('[TL] followers reply on replied to actor reply TL', async(async () => {
const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, target); const res = await request('/notes/replies', { noteId: tgt.id, limit: 100 }, target);
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const notes = res.body.filter((n: any) => n.id == folR.id); const notes = res.body.filter((n: any) => n.id == folR.id);
@ -458,14 +458,14 @@ describe('API visibility', () => {
//#endregion //#endregion
//#region MTL //#region MTL
it('[mentions] followers-reply が 非フォロワー (リプライ先である) から見れる', async(async () => { it('[TL] followers reply on replied to non-follower mention TL', async(async () => {
const res = await request('/notes/mentions', { limit: 100 }, target); const res = await request('/notes/mentions', { limit: 100 }, target);
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const notes = res.body.filter((n: any) => n.id == folR.id); const notes = res.body.filter((n: any) => n.id == folR.id);
assert.strictEqual(notes[0].text, 'x'); assert.strictEqual(notes[0].text, 'x');
})); }));
it('[mentions] followers-mention が 非フォロワー (メンション先である) から見れる', async(async () => { it('[TL] followers mention on mentioned non-follower mention TL', async(async () => {
const res = await request('/notes/mentions', { limit: 100 }, target); const res = await request('/notes/mentions', { limit: 100 }, target);
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const notes = res.body.filter((n: any) => n.id == folM.id); const notes = res.body.filter((n: any) => n.id == folM.id);

View file

@ -23,7 +23,7 @@ describe('Block', () => {
await shutdownServer(p); await shutdownServer(p);
}); });
it('Block作成', async(async () => { it('can block someone', async(async () => {
const res = await request('/blocking/create', { const res = await request('/blocking/create', {
userId: bob.id, userId: bob.id,
}, alice); }, alice);
@ -31,14 +31,14 @@ describe('Block', () => {
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
})); }));
it('ブロックされているユーザーをフォローできない', async(async () => { it('cannot follow if blocked', async(async () => {
const res = await request('/following/create', { userId: alice.id }, bob); const res = await request('/following/create', { userId: alice.id }, bob);
assert.strictEqual(res.status, 400); assert.strictEqual(res.status, 400);
assert.strictEqual(res.body.error.code, 'BLOCKED'); assert.strictEqual(res.body.error.code, 'BLOCKED');
})); }));
it('ブロックされているユーザーにリアクションできない', async(async () => { it('cannot react to blocking users note', async(async () => {
const note = await post(alice, { text: 'hello' }); const note = await post(alice, { text: 'hello' });
const res = await request('/notes/reactions/create', { noteId: note.id, reaction: '👍' }, bob); const res = await request('/notes/reactions/create', { noteId: note.id, reaction: '👍' }, bob);
@ -47,7 +47,7 @@ describe('Block', () => {
assert.strictEqual(res.body.error.code, 'BLOCKED'); assert.strictEqual(res.body.error.code, 'BLOCKED');
})); }));
it('ブロックされているユーザーに返信できない', async(async () => { it('cannot reply to blocking users note', async(async () => {
const note = await post(alice, { text: 'hello' }); const note = await post(alice, { text: 'hello' });
const res = await request('/notes/create', { replyId: note.id, text: 'yo' }, bob); const res = await request('/notes/create', { replyId: note.id, text: 'yo' }, bob);
@ -56,7 +56,7 @@ describe('Block', () => {
assert.strictEqual(res.body.error.code, 'BLOCKED'); assert.strictEqual(res.body.error.code, 'BLOCKED');
})); }));
it('ブロックされているユーザーのートをRenoteできない', async(async () => { it('canot renote blocking users note', async(async () => {
const note = await post(alice, { text: 'hello' }); const note = await post(alice, { text: 'hello' });
const res = await request('/notes/create', { renoteId: note.id, text: 'yo' }, bob); const res = await request('/notes/create', { renoteId: note.id, text: 'yo' }, bob);
@ -65,11 +65,11 @@ describe('Block', () => {
assert.strictEqual(res.body.error.code, 'BLOCKED'); assert.strictEqual(res.body.error.code, 'BLOCKED');
})); }));
// TODO: ユーザーリストに入れられないテスト // TODO: test that blocked user cannot be included in user list
// TODO: ユーザーリストから除外されるテスト // TODO: test that blocked user is removed from user list
it('タイムライン(LTL)にブロックされているユーザーの投稿が含まれない', async(async () => { it('local timeline does not contain blocked users', async(async () => {
const aliceNote = await post(alice); const aliceNote = await post(alice);
const bobNote = await post(bob); const bobNote = await post(bob);
const carolNote = await post(carol); const carolNote = await post(carol);