feat(programmer): dated work-log corrections
Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -526,6 +526,28 @@ void main() {
|
||||
expect(rows[1].containsKey('minutes'), isFalse); // null minutes omitted
|
||||
});
|
||||
|
||||
test('addWorkLog with workDate inserts work_date key', () async {
|
||||
final fake = _FakeClient('u1');
|
||||
final wl = ProgrammerTaskWorkLogsController(fake as dynamic);
|
||||
await wl.addWorkLog(
|
||||
taskId: 't1',
|
||||
description: 'correction',
|
||||
workDate: DateTime.utc(2026, 9, 25),
|
||||
);
|
||||
final rows = fake.tables['programmer_task_work_logs']!;
|
||||
expect(rows.length, 1);
|
||||
expect(rows.first['work_date'], '2026-09-25');
|
||||
});
|
||||
|
||||
test('addWorkLog without workDate omits work_date key', () async {
|
||||
final fake = _FakeClient('u1');
|
||||
final wl = ProgrammerTaskWorkLogsController(fake as dynamic);
|
||||
await wl.addWorkLog(taskId: 't1', description: 'progress');
|
||||
final rows = fake.tables['programmer_task_work_logs']!;
|
||||
expect(rows.length, 1);
|
||||
expect(rows.first.containsKey('work_date'), isFalse);
|
||||
});
|
||||
|
||||
test('addComment stores body + author with empty attachments', () async {
|
||||
final fake = _FakeClient('u1');
|
||||
final cc = ProgrammerTaskCommentsController(fake as dynamic);
|
||||
|
||||
Reference in New Issue
Block a user