forked from EduCraft/curriculum-project-hub
fix(hub): restore project create payload and stabilize integration DB seed
Explorer POST /projects was dropping projectId/folderId/workspaceDir after a narrowed response shape, breaking admin-explorer. Make seedTestOrganization idempotent under shared-DB isolation, force single-worker vitest, and align the OAuth no-membership redirect expectation with authRoutes.
This commit is contained in:
@@ -242,7 +242,8 @@ describe("admin auth + org API guards", () => {
|
||||
headers: { cookie: `${OAUTH_STATE_COOKIE_NAME}=${nonce}` },
|
||||
});
|
||||
expect(res.statusCode).toBe(302);
|
||||
expect(res.headers.location).toBe("/admin");
|
||||
// New users without membership land on login error; session is still set.
|
||||
expect(res.headers.location).toBe("/admin/login?error=no_organization");
|
||||
expect(JSON.stringify(res.headers["set-cookie"])).toContain("cph_session=");
|
||||
|
||||
const user = await prisma.user.findUnique({ where: { feishuOpenId: "ou_new" } });
|
||||
|
||||
Reference in New Issue
Block a user