From 198fe240f7031c81f5386b22aeeeeb7fef2075b1 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Thu, 19 Feb 2026 22:17:08 -0800 Subject: [PATCH] test: add profilePublic field to User test fixtures Updates all User test objects in auth.types.spec.ts to include the profilePublic field that was added to the User interface. Co-Authored-By: Claude Sonnet 4.5 --- shared-types/test/auth.types.spec.ts | 88 +++++++++++++++------------- 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/shared-types/test/auth.types.spec.ts b/shared-types/test/auth.types.spec.ts index 3354dae..0720be9 100644 --- a/shared-types/test/auth.types.spec.ts +++ b/shared-types/test/auth.types.spec.ts @@ -10,30 +10,32 @@ describe("auth Types", () => { describe("user interface", () => { it("should accept valid user objects", () => { const userWithAvatar: User = { - avatar: "https://example.com/avatar.png", - discordId: "discord123", - email: "test@example.com", - id: "user123", - inDiscord: true, - isAdmin: true, - isBanned: false, - isMod: true, - isStaff: true, - isVip: false, - username: "testuser", + avatar: "https://example.com/avatar.png", + discordId: "discord123", + email: "test@example.com", + id: "user123", + inDiscord: true, + isAdmin: true, + isBanned: false, + isMod: true, + isStaff: true, + isVip: false, + profilePublic: true, + username: "testuser", }; const userWithoutAvatar: User = { - discordId: "discord456", - email: "another@example.com", - id: "user456", - inDiscord: false, - isAdmin: false, - isBanned: false, - isMod: false, - isStaff: false, - isVip: true, - username: "anotheruser", + discordId: "discord456", + email: "another@example.com", + id: "user456", + inDiscord: false, + isAdmin: false, + isBanned: false, + isMod: false, + isStaff: false, + isVip: true, + profilePublic: false, + username: "anotheruser", }; expect(userWithAvatar.avatar).toBe("https://example.com/avatar.png"); @@ -44,16 +46,17 @@ describe("auth Types", () => { it("should handle all boolean flags correctly", () => { const bannedUser: User = { - discordId: "discord789", - email: "banned@example.com", - id: "banned123", - inDiscord: false, - isAdmin: false, - isBanned: true, - isMod: false, - isStaff: false, - isVip: false, - username: "banneduser", + discordId: "discord789", + email: "banned@example.com", + id: "banned123", + inDiscord: false, + isAdmin: false, + isBanned: true, + isMod: false, + isStaff: false, + isVip: false, + profilePublic: false, + username: "banneduser", }; expect(bannedUser.isBanned).toBeTruthy(); @@ -97,17 +100,18 @@ describe("auth Types", () => { const authResponse: AuthResponse = { accessToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", user: { - avatar: "https://example.com/avatar.png", - discordId: "discord123", - email: "test@example.com", - id: "user123", - inDiscord: true, - isAdmin: false, - isBanned: false, - isMod: false, - isStaff: false, - isVip: false, - username: "testuser", + avatar: "https://example.com/avatar.png", + discordId: "discord123", + email: "test@example.com", + id: "user123", + inDiscord: true, + isAdmin: false, + isBanned: false, + isMod: false, + isStaff: false, + isVip: false, + profilePublic: true, + username: "testuser", }, };