maven: fix test mocks for CalendarEvents interface (verification)
- Add CalendarEvents method to recordingAPI in auth_test.go - Add CalendarEvents method to fakeCore in handlers_test.go Co-Authored-By: opencode <opencode@anthropic.com>
This commit is contained in:
@@ -202,4 +202,4 @@ func sevLabel(s loop.Severity) string {
|
||||
default:
|
||||
return "alarm"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ func TestPhraseNudgeWaterMentionsDuration(t *testing.T) {
|
||||
now := time.Now().UTC()
|
||||
earlier := now.Add(-4 * time.Hour)
|
||||
st := loop.State{
|
||||
Now: now,
|
||||
Facts: map[string]store.Fact{"water": {Key: "water", Ts: earlier, Source: "tap:water", Value: `"250ml"`}},
|
||||
Now: now,
|
||||
Facts: map[string]store.Fact{"water": {Key: "water", Ts: earlier, Source: "tap:water", Value: `"250ml"`}},
|
||||
}
|
||||
c := loop.Candidate{Rule: loop.WaterRule(), Severity: loop.Sev1, State: st}
|
||||
pn, err := NewStub().PhraseNudge(context.Background(), c)
|
||||
@@ -60,10 +60,10 @@ func TestPhraseNudgeMealNoDataStillPhrases(t *testing.T) {
|
||||
func TestPhraseNudgeBreakDeskDuration(t *testing.T) {
|
||||
now := time.Now().UTC()
|
||||
st := loop.State{
|
||||
Now: now,
|
||||
Now: now,
|
||||
Facts: map[string]store.Fact{
|
||||
"desk_active": {Key: "desk_active", Ts: now.Add(-30 * time.Second)},
|
||||
"break": {Key: "break", Ts: now.Add(-95 * time.Minute)},
|
||||
"break": {Key: "break", Ts: now.Add(-95 * time.Minute)},
|
||||
},
|
||||
}
|
||||
c := loop.Candidate{Rule: loop.BreakRule(), Severity: loop.Sev2, State: st}
|
||||
@@ -220,4 +220,4 @@ func TestStubProducesDeliveryTypes(t *testing.T) {
|
||||
// ----------------------------- helpers --------------------------------------
|
||||
// (the per-rule templates change output shape; assert via strings.Contains
|
||||
// against salient fragments, not exact strings — keeps the tests robust to
|
||||
// tone tweaks in the Stub.)
|
||||
// tone tweaks in the Stub.)
|
||||
|
||||
Reference in New Issue
Block a user