summaryrefslogtreecommitdiff
path: root/internal/handlers/timeline_logic_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handlers/timeline_logic_test.go')
-rw-r--r--internal/handlers/timeline_logic_test.go7
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()