summaryrefslogtreecommitdiff
path: root/internal/api/google_calendar_test.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-13 17:52:10 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-16 02:42:31 +0000
commitc4066f78d83b1440155248f9bc724b905aa88697 (patch)
tree70b557a1e340f12aa125fd0c53effabcbda4027b /internal/api/google_calendar_test.go
parentfb41a5eb47a4213c3f9a7095da4b8741f1598725 (diff)
feat(widget): tap event to open its source directly, drop detail popup
Tapping a calendar event (or any event-type item) now opens the event's URL (Google Calendar, Plan to Eat, etc.) directly instead of showing an intermediate popup with an "Open in Calendar" button. Removes EventDetailActivity and the recurrence-schedule lookup it was the only consumer of: WidgetRepository.getRecurrence, the Go /api/widget/recurrence endpoint, HandleWidgetRecurrence, GoogleCalendarAPI.GetRecurrenceRule, and formatRecurrence, plus their tests. RecurringEventID itself stays -- it's general calendar-sync metadata used elsewhere in the timeline pipeline, not exclusive to the removed popup.
Diffstat (limited to 'internal/api/google_calendar_test.go')
-rw-r--r--internal/api/google_calendar_test.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/internal/api/google_calendar_test.go b/internal/api/google_calendar_test.go
index efbab0d..3cf0dbd 100644
--- a/internal/api/google_calendar_test.go
+++ b/internal/api/google_calendar_test.go
@@ -272,33 +272,3 @@ func TestGetUpcomingEvents_APIError_ReturnsEmptyNotError(t *testing.T) {
t.Errorf("expected 0 events on API error, got %d", len(events))
}
}
-
-// --- formatRecurrence ---
-
-func TestFormatRecurrence(t *testing.T) {
- tests := []struct {
- name string
- rules []string
- want string
- }{
- {"weekly single day", []string{"RRULE:FREQ=WEEKLY;BYDAY=MO"}, "Repeats weekly on Monday"},
- {"weekly multiple days", []string{"RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR"}, "Repeats weekly on Monday, Wednesday, Friday"},
- {"daily", []string{"RRULE:FREQ=DAILY"}, "Repeats daily"},
- {"monthly", []string{"RRULE:FREQ=MONTHLY"}, "Repeats monthly"},
- {"yearly", []string{"RRULE:FREQ=YEARLY"}, "Repeats yearly"},
- {"interval weekly", []string{"RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=SU"}, "Repeats every 2 weeks on Sunday"},
- {"interval daily", []string{"RRULE:FREQ=DAILY;INTERVAL=3"}, "Repeats every 3 days"},
- {"unrecognized frequency", []string{"RRULE:FREQ=HOURLY"}, "Recurring event"},
- {"empty", []string{}, "Recurring event"},
- {"unparseable", []string{"not a valid rule"}, "Recurring event"},
- }
-
- for _, tc := range tests {
- t.Run(tc.name, func(t *testing.T) {
- got := formatRecurrence(tc.rules)
- if got != tc.want {
- t.Errorf("formatRecurrence(%v) = %q, want %q", tc.rules, got, tc.want)
- }
- })
- }
-}