feat(programmer): dated work-log corrections
Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -326,5 +326,34 @@ void main() {
|
||||
expect(result.workLogs, hasLength(1));
|
||||
expect(result.workLogs.first.taskId, 'helper-task');
|
||||
});
|
||||
|
||||
test('excludes work logs with a different work_date', () async {
|
||||
final tTask = _task(
|
||||
id: 'some-task',
|
||||
status: ProgrammerTaskStatus.inProgress,
|
||||
startedAt: DateTime.utc(2026, 9, 27, 0, 0),
|
||||
);
|
||||
final client = _FakeClient(tables: {
|
||||
'programmer_task_work_logs': [
|
||||
{
|
||||
'id': 'wl-old',
|
||||
'task_id': 'some-task',
|
||||
'author_id': 'u1',
|
||||
'description': 'yesterday',
|
||||
'minutes': 60,
|
||||
'created_at': '2026-09-26T10:00:00Z',
|
||||
'work_date': '2026-09-26',
|
||||
},
|
||||
],
|
||||
'programmer_task_activity_logs': [],
|
||||
});
|
||||
final result = await fetchDayActivityData(
|
||||
client,
|
||||
day: day,
|
||||
tasks: [tTask],
|
||||
now: now,
|
||||
);
|
||||
expect(result.workLogs, isEmpty);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user