import { describe, expect, it } from "vitest"; import { inviteExpiredPath, invitedRulePath, } from "../../lib/create/invitePaths"; describe("invitedRulePath", () => { it("encodes the rule id", () => { expect(invitedRulePath("ab/c")).toBe("/invite/ab%2Fc"); }); it("appends copy=1", () => { expect(invitedRulePath("rule-1", { copy: true })).toBe( "/invite/rule-1?copy=1", ); }); }); describe("inviteExpiredPath", () => { it("omits the token when missing", () => { expect(inviteExpiredPath()).toBe("/invite/expired"); }); it("encodes the token", () => { expect(inviteExpiredPath("a+b")).toBe("/invite/expired?token=a%2Bb"); }); });