mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-11 01:00:07 +09:00
test(backend): update tests
This commit is contained in:
parent
699cbd0d77
commit
8b7ae92b78
@ -210,7 +210,7 @@ describe('ActivityPub', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('Collection visibility', () => {
|
describe('Collection visibility', () => {
|
||||||
test('Public following/followers', async () => {
|
test('Public following/followers/reactions', async () => {
|
||||||
const actor = createRandomActor();
|
const actor = createRandomActor();
|
||||||
actor.following = {
|
actor.following = {
|
||||||
id: `${actor.id}/following`,
|
id: `${actor.id}/following`,
|
||||||
@ -219,6 +219,12 @@ describe('ActivityPub', () => {
|
|||||||
first: `${actor.id}/following?page=1`,
|
first: `${actor.id}/following?page=1`,
|
||||||
};
|
};
|
||||||
actor.followers = `${actor.id}/followers`;
|
actor.followers = `${actor.id}/followers`;
|
||||||
|
actor.liked ={
|
||||||
|
id: `${actor.id}/following`,
|
||||||
|
type: 'OrderedCollection',
|
||||||
|
totalItems: 0,
|
||||||
|
orderedItems: [],
|
||||||
|
};
|
||||||
|
|
||||||
resolver.register(actor.id, actor);
|
resolver.register(actor.id, actor);
|
||||||
resolver.register(actor.followers, {
|
resolver.register(actor.followers, {
|
||||||
@ -233,9 +239,10 @@ describe('ActivityPub', () => {
|
|||||||
|
|
||||||
assert.deepStrictEqual(userProfile.followingVisibility, 'public');
|
assert.deepStrictEqual(userProfile.followingVisibility, 'public');
|
||||||
assert.deepStrictEqual(userProfile.followersVisibility, 'public');
|
assert.deepStrictEqual(userProfile.followersVisibility, 'public');
|
||||||
|
assert.deepStrictEqual(userProfile.publicReactions, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Private following/followers', async () => {
|
test('Private following/followers/reactions', async () => {
|
||||||
const actor = createRandomActor();
|
const actor = createRandomActor();
|
||||||
actor.following = {
|
actor.following = {
|
||||||
id: `${actor.id}/following`,
|
id: `${actor.id}/following`,
|
||||||
@ -244,6 +251,7 @@ describe('ActivityPub', () => {
|
|||||||
// first: …
|
// first: …
|
||||||
};
|
};
|
||||||
actor.followers = `${actor.id}/followers`;
|
actor.followers = `${actor.id}/followers`;
|
||||||
|
// actor.liked = …;
|
||||||
|
|
||||||
resolver.register(actor.id, actor);
|
resolver.register(actor.id, actor);
|
||||||
//resolver.register(actor.followers, { … });
|
//resolver.register(actor.followers, { … });
|
||||||
@ -253,6 +261,7 @@ describe('ActivityPub', () => {
|
|||||||
|
|
||||||
assert.deepStrictEqual(userProfile.followingVisibility, 'private');
|
assert.deepStrictEqual(userProfile.followingVisibility, 'private');
|
||||||
assert.deepStrictEqual(userProfile.followersVisibility, 'private');
|
assert.deepStrictEqual(userProfile.followersVisibility, 'private');
|
||||||
|
assert.deepStrictEqual(userProfile.publicReactions, false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user