fix(auth): 访客工作台 - 欢迎页关闭后展示创作界面 (#697)
Co-authored-by: a0 <a0@Mac-mini.local>
This commit is contained in:
13
web/test/guest-workspace-access.test.ts
Normal file
13
web/test/guest-workspace-access.test.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user