docs: harden demo email migration checks

This commit is contained in:
AgendaPro Dev
2026-07-27 13:48:12 -06:00
parent 811b664405
commit 3f84371842
4 changed files with 85 additions and 30 deletions
+12
View File
@@ -27,6 +27,18 @@ const me = await req("/api/auth/demo-users"); check("demo-users >= 8", me.json.u
const owner = await login("[email protected]"); check("owner login", !!owner.token && owner.user.role === "owner");
const empLogin = await login("[email protected]"); check("employee login", empLogin.user.role === "employee" && empLogin.user.employee_id);
const adminLogin = await login("[email protected]"); check("admin login", adminLogin.user.role === "admin");
const legacyAdmin = await req("/api/auth/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "[email protected]", password: "demo1234" }),
});
check("[email protected] legacy login rejected", legacyAdmin.status === 401, `status=${legacyAdmin.status}`);
const legacyOwner = await req("/api/auth/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "[email protected]", password: "demo1234" }),
});
check("[email protected] legacy login rejected", legacyOwner.status === 401, `status=${legacyOwner.status}`);
const t = owner.token, eT = empLogin.token, aT = adminLogin.token;
// /me fix