mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
Purge ActivityPub from project to start implementing Lysand
This commit is contained in:
parent
3e86ffbf2d
commit
02b56f8fde
13 changed files with 9 additions and 1357 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue