test(backend): add federation test for publicReactions

This commit is contained in:
Daiki Mizukami 2024-11-09 18:31:41 +09:00
parent 5257591c16
commit 2004d5e2f8
No known key found for this signature in database
GPG key ID: 10478E598B944AA2

View file

@ -43,12 +43,11 @@ describe('User', () => {
'uri',
'createdAt',
'lastFetchedAt',
'publicReactions',
]);
});
});
describe('ffVisibility is federated', () => {
describe('ff/reactions visibility is federated', () => {
let alice: LoginUser, bob: LoginUser;
let bobInA: Misskey.entities.UserDetailedNotMe, aliceInB: Misskey.entities.UserDetailedNotMe;
@ -78,6 +77,7 @@ describe('User', () => {
])) {
strictEqual(user.followersVisibility, 'public');
strictEqual(user.followingVisibility, 'public');
strictEqual(user.publicReactions, true);
}
});
@ -113,6 +113,22 @@ describe('User', () => {
strictEqual(user.followingVisibility, 'private');
}
});
test('Setting false for publicReactions is federated', async () => {
await Promise.all([
alice.client.request('i/update', { publicReactions: false }),
bob.client.request('i/update', { publicReactions: false }),
]);
await sleep();
for (const user of await Promise.all([
alice.client.request('users/show', { userId: bobInA.id }),
bob.client.request('users/show', { userId: aliceInB.id }),
])) {
strictEqual(user.publicReactions, false);
strictEqual(user.publicReactions, false);
}
});
});
describe('isCat is federated', () => {