Fix server test expectations for grants

This commit is contained in:
Dotta committed 2026-07-09 18:52:54 +00:00
1 parent 593aa8c9c2
commit 7dcf2241b9
2 files changed
+6

No files matched your search

@@ -10,9 +10,11 @@ import {
companies,
companySkillVersions,
companySkills,
companyMemberships,
createDb,
heartbeatRunEvents,
heartbeatRuns,
principalPermissionGrants,
routines,
routineTriggers,
} from "@paperclipai/db";
@@ -54,6 +56,8 @@ describeEmbeddedPostgres("companyService", () => {
await db.delete(agentConfigRevisions);
await db.delete(activityLog);
await db.delete(agents);
await db.delete(principalPermissionGrants);
await db.delete(companyMemberships);
await db.delete(companies);
});
@@ -68,6 +68,7 @@ describe("human invite roles", () => {
it("maps owner to the full management grant set", () => {
expect(grantsForHumanRole("owner")).toEqual([
{ permissionKey: "agents:create", scope: null },
{ permissionKey: "agents:configure", scope: null },
{ permissionKey: "skills:create", scope: null },
{ permissionKey: "environments:manage", scope: null },
{ permissionKey: "users:invite", scope: null },
@@ -80,6 +81,7 @@ describe("human invite roles", () => {
it("maps admin to management grants including environment management", () => {
expect(grantsForHumanRole("admin")).toEqual([
{ permissionKey: "agents:create", scope: null },
{ permissionKey: "agents:configure", scope: null },
{ permissionKey: "skills:create", scope: null },
{ permissionKey: "environments:manage", scope: null },
{ permissionKey: "users:invite", scope: null },