From 6fdd09bfe030ce91ee188f18c198fd6a57c7b42f Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 12 Jul 2026 11:12:55 +0000 Subject: feat(widget): add recurrence lookup endpoint (GET /api/widget/recurrence) --- internal/handlers/timeline_logic_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/handlers/timeline_logic_test.go') diff --git a/internal/handlers/timeline_logic_test.go b/internal/handlers/timeline_logic_test.go index 9ddaeda..5e7cb27 100644 --- a/internal/handlers/timeline_logic_test.go +++ b/internal/handlers/timeline_logic_test.go @@ -23,6 +23,9 @@ type MockCalendarClient struct { // with, for tests that need to assert on how the caller resolved its // calendar ID list (e.g. fetchCalendarEvents' comma-split fallback). SetCalendarIDsCalls [][]string + // RecurrenceRule is returned by GetRecurrenceRule for any id when RecurrenceErr is nil. + RecurrenceRule string + RecurrenceErr error } func (m *MockCalendarClient) GetUpcomingEvents(ctx context.Context, maxResults int) ([]models.CalendarEvent, error) { @@ -41,6 +44,10 @@ func (m *MockCalendarClient) SetCalendarIDs(ids []string) { m.SetCalendarIDsCalls = append(m.SetCalendarIDsCalls, ids) } +func (m *MockCalendarClient) GetRecurrenceRule(ctx context.Context, recurringEventID string) (string, error) { + return m.RecurrenceRule, m.RecurrenceErr +} + func setupTestStore(t *testing.T) *store.Store { t.Helper() tempDir := t.TempDir() -- cgit v1.2.3