feat: real audit_log with redaction + pending_changes; replace stub
This commit is contained in:
16
tests/db/migration_006.test.js
Normal file
16
tests/db/migration_006.test.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { describe, it, expect, beforeAll } from 'vitest';
|
||||
import { resetDb, withClient } from '../helpers/db.js';
|
||||
import { migrateUp } from '../../lib/db/migrate.js';
|
||||
|
||||
describe('migration 006 — audit', () => {
|
||||
beforeAll(async () => { await resetDb(); await migrateUp(); });
|
||||
|
||||
it('creates audit_log and pending_changes', async () => {
|
||||
await withClient(async (c) => {
|
||||
for (const t of ['audit_log','pending_changes']) {
|
||||
const { rows } = await c.query(`SELECT to_regclass('public.' || $1) AS t;`, [t]);
|
||||
expect(rows[0].t).toBe(t);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user