fix(auth): 访客工作台 - 欢迎页关闭后展示创作界面 (#697)

Co-authored-by: a0 <a0@Mac-mini.local>
This commit is contained in:
esncy
2026-10-07 08:47:55 +08:00
committed by GitHub
parent d6a57c2fa7
commit 0b1d5073e8
10 changed files with 126 additions and 28 deletions

View File

@@ -0,0 +1,13 @@
import { describe, expect, test } from "bun:test";
import { isGuestWorkspacePath } from "../src/lib/guest-workspace";
describe("guest workspace route access", () => {
test("allows only the public creation workspace routes", () => {
expect(isGuestWorkspacePath("/")).toBe(true);
expect(isGuestWorkspacePath("/create")).toBe(true);
expect(isGuestWorkspacePath("/assets")).toBe(false);
expect(isGuestWorkspacePath("/admin")).toBe(false);
expect(isGuestWorkspacePath("/create/anything")).toBe(false);
});
});