mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 18:48:31 +01:00
test(backend): add federation test for publicReactions
This commit is contained in:
parent
5257591c16
commit
2004d5e2f8
1 changed files with 18 additions and 2 deletions
|
@ -43,12 +43,11 @@ describe('User', () => {
|
||||||
'uri',
|
'uri',
|
||||||
'createdAt',
|
'createdAt',
|
||||||
'lastFetchedAt',
|
'lastFetchedAt',
|
||||||
'publicReactions',
|
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('ffVisibility is federated', () => {
|
describe('ff/reactions visibility is federated', () => {
|
||||||
let alice: LoginUser, bob: LoginUser;
|
let alice: LoginUser, bob: LoginUser;
|
||||||
let bobInA: Misskey.entities.UserDetailedNotMe, aliceInB: Misskey.entities.UserDetailedNotMe;
|
let bobInA: Misskey.entities.UserDetailedNotMe, aliceInB: Misskey.entities.UserDetailedNotMe;
|
||||||
|
|
||||||
|
@ -78,6 +77,7 @@ describe('User', () => {
|
||||||
])) {
|
])) {
|
||||||
strictEqual(user.followersVisibility, 'public');
|
strictEqual(user.followersVisibility, 'public');
|
||||||
strictEqual(user.followingVisibility, 'public');
|
strictEqual(user.followingVisibility, 'public');
|
||||||
|
strictEqual(user.publicReactions, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -113,6 +113,22 @@ describe('User', () => {
|
||||||
strictEqual(user.followingVisibility, 'private');
|
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', () => {
|
describe('isCat is federated', () => {
|
||||||
|
|
Loading…
Reference in a new issue