diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-12 11:12:55 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-12 11:12:55 +0000 |
| commit | 6fdd09bfe030ce91ee188f18c198fd6a57c7b42f (patch) | |
| tree | b358dcd34aee62de8bcefafdffa2049d57f900df /internal/handlers/timeline_logic_test.go | |
| parent | f31b4722243b8b69564c94e47e07678153c31815 (diff) | |
feat(widget): add recurrence lookup endpoint (GET /api/widget/recurrence)
Diffstat (limited to 'internal/handlers/timeline_logic_test.go')
| -rw-r--r-- | internal/handlers/timeline_logic_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
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() |
