Read the plan service's today from the scheduler's clock
The plan service read "today" from time.Now, so the plan-draft schedule tests could not pin the plan_ready title on the fake clock. NewService now takes a clock; the server passes the scheduler's Now. The plan-draft tests read the started scheduler's fake clock and assert each plan_ready row's title and channel alongside the existing key assertions. Maestro task ece60217-04d0-43a4-9690-4aba2a00d420 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -158,7 +158,7 @@ func run(cfg config.Config, logger *slog.Logger) error {
|
||||
return err
|
||||
}
|
||||
|
||||
planSvc, err := plan.NewService(db, weekDrafter(ai, guard), runner, googleSvc, notifier, sched.Wake, cfg.PublicURL, logger)
|
||||
planSvc, err := plan.NewService(db, weekDrafter(ai, guard), runner, googleSvc, notifier, sched.Wake, cfg.PublicURL, sched.Now, logger)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user