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:
@@ -129,9 +129,9 @@ func TestTickCooldownSuppresses(t *testing.T) {
|
||||
now := refTime()
|
||||
// 4h since water (would fire) — but cooldown until now+10min. Suppressed.
|
||||
s := State{
|
||||
Now: now,
|
||||
Presence: store.Present,
|
||||
Facts: map[string]store.Fact{
|
||||
Now: now,
|
||||
Presence: store.Present,
|
||||
Facts: map[string]store.Fact{
|
||||
"water": factAt("water", "tap:water", `"250ml"`, now.Add(-4*time.Hour)),
|
||||
},
|
||||
CooldownUntil: map[string]time.Time{
|
||||
@@ -197,9 +197,9 @@ func TestGateNoDataInertShutsUp(t *testing.T) {
|
||||
// is missing in the snapshot — gate must still return false.
|
||||
s := State{Now: refTime(), Presence: store.Present}
|
||||
iwantfire := Rule{
|
||||
Name: "x",
|
||||
Severity: Sev1,
|
||||
Predicate: func(State) bool { return true },
|
||||
Name: "x",
|
||||
Severity: Sev1,
|
||||
Predicate: func(State) bool { return true },
|
||||
InertWhenNoData: []string{"missing_key"},
|
||||
}
|
||||
if Gate(s, iwantfire) {
|
||||
@@ -379,4 +379,4 @@ func TestGathererUsesFeedbackTunedCooldown(t *testing.T) {
|
||||
if d, ok := ParseCooldownFact(fb); !ok || d != tuned {
|
||||
t.Fatalf("ParseCooldownFact round-trip: want %v ok, got %v ok=%v", tuned, d, ok)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user