Files
Jyotisha/frontend/tests/chart-profile-upsert-grant.test.ts
T
2026-07-20 16:52:53 +08:00

16 lines
532 B
TypeScript

import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
const migration = readFileSync(
new URL("../supabase/migrations/20260718104000_chart_profiles_upsert_id_grant.sql", import.meta.url),
"utf8",
);
test("authenticated chart-profile upserts may update their unchanged conflict id", () => {
assert.match(
migration,
/grant\s+update\s*\(\s*id\s*,\s*role\s*,\s*profile\s*,\s*updated_at\s*\)\s+on\s+table\s+public\.chart_profiles\s+to\s+authenticated/i,
);
});