feat: Admin Area General Settings and Categories 1.07

This commit is contained in:
OpenVelo Agent
2026-07-22 14:52:59 +00:00
parent 1858121f75
commit 1e77b7a273
7 changed files with 323 additions and 97 deletions
+18
View File
@@ -73,4 +73,22 @@ describe('Migrations', () => {
const restrict = fks.filter((f: any) => f.on_delete === 'RESTRICT');
expect(restrict.length).toBeGreaterThanOrEqual(2);
});
it('creates the category table with created_at and updated_at columns (Job 889)', async () => {
const cols: any[] = await dataSource.query(`PRAGMA table_info("category")`);
const names = new Set(cols.map((c: any) => c.name));
expect(names.has('created_at')).toBe(true);
expect(names.has('updated_at')).toBe(true);
});
it('lists categories without a "no such column: c.created_at" error (Job 889)', async () => {
const rows = await dataSource
.getRepository(CategoryEntity)
.createQueryBuilder('c')
.orderBy('LOWER(c.abbreviation)', 'ASC')
.addOrderBy('c.abbreviation', 'ASC')
.getMany();
expect(Array.isArray(rows)).toBe(true);
expect(rows.length).toBeGreaterThanOrEqual(6);
});
});