feat: Admin Area General Settings and Categories 1.07
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user