13 lines
469 B
TypeScript
13 lines
469 B
TypeScript
// @vitest-environment node
|
|
import { readFileSync } from "node:fs";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("search RLS artifact", () => {
|
|
const sql = readFileSync(new URL("../../../prisma/rls/search-isolation.sql", import.meta.url), "utf8");
|
|
|
|
it("uses the canonical tenant context set by withTenantRLS", () => {
|
|
expect(sql).toContain("current_setting('app.tenant_id', true)");
|
|
expect(sql).not.toContain("app.current_tenant_id");
|
|
});
|
|
});
|