More refactoring, API route fixes

This commit is contained in:
Jesse Wierzbinski 2023-09-26 13:08:05 -10:00
parent 3b452d66aa
commit 95b46ba2e4
6 changed files with 72 additions and 16 deletions

View file

@ -80,7 +80,6 @@ afterAll(async () => {
);
if (user) {
await user.selfDestruct();
await user.remove();
}
});

View file

@ -580,9 +580,6 @@ afterAll(async () => {
})
);
await user.selfDestruct();
await user.remove();
await user2.selfDestruct();
await user2.remove();
});

View file

@ -188,6 +188,30 @@ describe("POST /@test/inbox", () => {
expect(activity?.actors[0].data).toEqual({
preferredUsername: "test",
id: `${config.http.base_url}/@test`,
summary: "",
publicKey: {
id: `${config.http.base_url}/@test/actor#main-key`,
owner: `${config.http.base_url}/@test/actor`,
publicKeyPem: expect.any(String),
},
outbox: `${config.http.base_url}/@test/outbox`,
manuallyApprovesFollowers: false,
followers: `${config.http.base_url}/@test/followers`,
following: `${config.http.base_url}/@test/following`,
name: "",
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
],
icon: {
type: "Image",
url: "",
},
image: {
type: "Image",
url: "",
},
inbox: `${config.http.base_url}/@test/inbox`,
type: "Person",
});