test: update retired rectification account contract

This commit is contained in:
Jesse_Chen
2026-08-07 13:18:16 +08:00
parent f3946eaa6f
commit 3f2b0243df
+4 -2
View File
@@ -65,7 +65,7 @@ test("session API owns create and update while answer UI keeps sync failures out
});
test("homepage bootstrap reads profiles and sessions through same-origin APIs", () => {
test("self-hosted staging bootstrap reads profile and sessions through same-origin APIs", () => {
const page = readFileSync(new URL("../src/app/page.tsx", import.meta.url), "utf8");
const accountRoute = readFileSync(new URL("../src/app/api/account/route.ts", import.meta.url), "utf8");
@@ -74,5 +74,7 @@ test("homepage bootstrap reads profiles and sessions through same-origin APIs",
assert.match(page, /fetch\("\/api\/sessions"/);
assert.match(page, /writeChatSession\(initialSession\.id,[\s\S]*?"create"\)/);
assert.match(page, /fetch\(`\/api\/sessions\/\$\{encodeURIComponent\(sessionId\)\}`/);
assert.match(accountRoute, /rectificationCase,\s*profile,/);
assert.match(accountRoute, /AUTH_PROVIDER\?\.trim\(\) === "self-hosted"/);
assert.match(accountRoute, /profile,/);
assert.doesNotMatch(accountRoute, /rectificationCase/);
});