fix: closing the week early should count properly

This commit is contained in:
2026-05-13 20:47:39 +00:00
parent c617012401
commit 8cd58fbd2c
2 changed files with 12 additions and 8 deletions

View File

@@ -246,7 +246,7 @@ func TestCloseWeekMidWeek(t *testing.T) {
t.Errorf("expected_ms: want %s, got %s", wantExpected, time.Duration(cw.ExpectedMs)*time.Millisecond)
}
const wantDelta = wantWorked - wantExpected // 11.5h
if cw.DeltaMs != int64(wantDelta) {
if cw.DeltaMs != int64(wantDelta/time.Millisecond) {
t.Errorf("delta_ms: want %s, got %s", wantDelta, time.Duration(cw.DeltaMs)*time.Millisecond)
}
}