fix(gro-48): add missing icalToken to schema and test fixtures
StaffRow now requires icalToken (from iCal calendar feed feature). Adding icalToken: null to MANAGER mock in groomerIsolation.test.ts, petPhotos.test.ts, rbac.test.ts, and buildStaff factory. Also adding icalToken column to staff table schema to match origin/main. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -21,6 +21,7 @@ const MANAGER: StaffRow = {
|
||||
active: true,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
icalToken: null,
|
||||
};
|
||||
|
||||
const GROOMER: StaffRow = {
|
||||
|
||||
@@ -13,6 +13,7 @@ const MANAGER: StaffRow = {
|
||||
active: true,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
icalToken: null,
|
||||
};
|
||||
|
||||
const GROOMER: StaffRow = {
|
||||
|
||||
@@ -14,6 +14,7 @@ const MANAGER: StaffRow = {
|
||||
active: true,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
icalToken: null,
|
||||
};
|
||||
|
||||
const RECEPTIONIST: StaffRow = {
|
||||
|
||||
@@ -54,6 +54,7 @@ export function buildStaff(overrides: Partial<StaffRow> = {}): StaffRow {
|
||||
active: true,
|
||||
createdAt: new Date("2025-01-01T00:00:00Z"),
|
||||
updatedAt: new Date("2025-01-01T00:00:00Z"),
|
||||
icalToken: null,
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -106,6 +106,8 @@ export const staff = pgTable("staff", {
|
||||
oidcSub: text("oidc_sub").unique(),
|
||||
role: staffRoleEnum("role").notNull().default("groomer"),
|
||||
active: boolean("active").notNull().default(true),
|
||||
// Token for iCal calendar feed subscription (no auth required)
|
||||
icalToken: text("ical_token").unique(),
|
||||
createdAt: timestamp("created_at").notNull().defaultNow(),
|
||||
updatedAt: timestamp("updated_at").notNull().defaultNow(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user