mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(api): 🎨 Move User methods into their own class similar to Note
This commit is contained in:
parent
abc8f1ae16
commit
9d70778abd
81 changed files with 2055 additions and 1603 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue