|
|
|
@ -83,12 +83,13 @@ describe('Database', () => {
|
|
|
|
expect(group.active).toBe(1); // SQLite uses 1 for TRUE
|
|
|
|
expect(group.active).toBe(1); // SQLite uses 1 for TRUE
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
test('response_queue table should have required columns', () => {
|
|
|
|
test('response_queue table should have required columns (at least base set)', () => {
|
|
|
|
const columns = testDb
|
|
|
|
const columns = testDb
|
|
|
|
.query("PRAGMA table_info(response_queue)")
|
|
|
|
.query("PRAGMA table_info(response_queue)")
|
|
|
|
.all()
|
|
|
|
.all()
|
|
|
|
.map((c: any) => c.name);
|
|
|
|
.map((c: any) => c.name);
|
|
|
|
expect(columns).toEqual(['id', 'recipient', 'message', 'status', 'attempts', 'last_error', 'metadata', 'created_at', 'updated_at']);
|
|
|
|
const expectedBase = ['id', 'recipient', 'message', 'status', 'attempts', 'last_error', 'metadata', 'created_at', 'updated_at'];
|
|
|
|
|
|
|
|
expectedBase.forEach(col => expect(columns).toContain(col));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|