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:
@@ -94,7 +94,7 @@ func newEnv(t *testing.T) *env {
|
||||
draft := func(context.Context, string, skills.WeekRequest) (skills.Week, error) {
|
||||
return skills.Week{}, errors.New("no model in this test")
|
||||
}
|
||||
plans, err := plan.NewService(st, draft, runner, googleSvc, notifier, func() {}, pub, logger)
|
||||
plans, err := plan.NewService(st, draft, runner, googleSvc, notifier, func() {}, pub, time.Now, logger)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user