Purge ActivityPub from project to start implementing Lysand

This commit is contained in:
Jesse Wierzbinski 2023-10-30 10:23:29 -10:00
parent 3e86ffbf2d
commit 02b56f8fde
No known key found for this signature in database
GPG key ID: F9A1E418934E40B0
13 changed files with 9 additions and 1357 deletions

View file

@ -4,7 +4,6 @@ import { getConfig } from "@config";
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import { AppDataSource } from "~database/datasource";
import { Application } from "~database/entities/Application";
import { RawActivity } from "~database/entities/RawActivity";
import { Token, TokenType } from "~database/entities/Token";
import { User } from "~database/entities/User";
import { APIAccount } from "~types/entities/account";
@ -63,21 +62,6 @@ describe("API Tests", () => {
});
afterAll(async () => {
const activities = await RawActivity.createQueryBuilder("activity")
.where("activity.data->>'actor' = :actor", {
actor: `${config.http.base_url}/users/test`,
})
.leftJoinAndSelect("activity.objects", "objects")
.getMany();
// Delete all created objects and activities as part of testing
for (const activity of activities) {
for (const object of activity.objects) {
await object.remove();
}
await activity.remove();
}
await user.remove();
await user2.remove();

View file

@ -4,7 +4,6 @@ import { getConfig } from "@config";
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import { AppDataSource } from "~database/datasource";
import { Application } from "~database/entities/Application";
import { RawActivity } from "~database/entities/RawActivity";
import { Token, TokenType } from "~database/entities/Token";
import { User } from "~database/entities/User";
import { APIContext } from "~types/entities/context";
@ -64,21 +63,6 @@ describe("API Tests", () => {
});
afterAll(async () => {
const activities = await RawActivity.createQueryBuilder("activity")
.where("activity.data->>'actor' = :actor", {
actor: `${config.http.base_url}/users/test`,
})
.leftJoinAndSelect("activity.objects", "objects")
.getMany();
// Delete all created objects and activities as part of testing
for (const activity of activities) {
for (const object of activity.objects) {
await object.remove();
}
await activity.remove();
}
await user.remove();
await user2.remove();