refactor(api): 🎨 Move User methods into their own class similar to Note

This commit is contained in:
Jesse Wierzbinski 2024-04-24 17:40:27 -10:00
parent abc8f1ae16
commit 9d70778abd
No known key found for this signature in database
81 changed files with 2055 additions and 1603 deletions

View file

@ -72,7 +72,7 @@ describe("API Tests", () => {
const account = (await response.json()) as APIAccount;
expect(account.username).toBe(user.username);
expect(account.username).toBe(user.getUser().username);
expect(account.bot).toBe(false);
expect(account.locked).toBe(false);
expect(account.created_at).toBeDefined();
@ -81,7 +81,10 @@ describe("API Tests", () => {
expect(account.statuses_count).toBe(0);
expect(account.note).toBe("");
expect(account.url).toBe(
new URL(`/@${user.username}`, config.http.base_url).toString(),
new URL(
`/@${user.getUser().username}`,
config.http.base_url,
).toString(),
);
expect(account.avatar).toBeDefined();
expect(account.avatar_static).toBeDefined();