14 lines
687 B
TypeScript
14 lines
687 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { describe, expect, it } from "vitest";
|
|
import { resolveRepoPath } from "~/utils/testing/repoPaths";
|
|
|
|
describe("public signature RLS bootstrap", () => {
|
|
it("uses the narrow resolver and re-reads the exact signer in tenant context", () => {
|
|
const source = readFileSync(resolveRepoPath("apps/web/app/modules/signature/services/signatureService.server.ts"), "utf8");
|
|
|
|
expect(source).toContain("resolveSignatureSignerRlsIdentity(tokenHash)");
|
|
expect(source).toContain("id: identity.resourceId, tenantId: identity.tenantId, accessTokenHash: tokenHash");
|
|
expect(source).not.toContain("loadSignerTenantIdByTokenHash");
|
|
});
|
|
});
|