diff --git a/tests/test_calendar.py b/tests/test_calendar.py index 6f6b351..3f9647f 100644 --- a/tests/test_calendar.py +++ b/tests/test_calendar.py @@ -223,7 +223,12 @@ class FakeProc: stdout = json.dumps(fake_payload) stderr = "" - with patch("ghostbrain.connectors.calendar.macos.subprocess.run", + # Force the JXA fallback path: on dev machines with EventKit access + # granted, `_fetch_via_eventkit` would return real calendar data and + # bypass the subprocess mock entirely. + with patch("ghostbrain.connectors.calendar.macos._fetch_via_eventkit", + return_value=None), \ + patch("ghostbrain.connectors.calendar.macos.subprocess.run", return_value=FakeProc()): events = connector.fetch(datetime(2026, 5, 9, tzinfo=timezone.utc)) diff --git a/tests/test_weekly_digest.py b/tests/test_weekly_digest.py index 0e3d456..0a002ab 100644 --- a/tests/test_weekly_digest.py +++ b/tests/test_weekly_digest.py @@ -226,9 +226,11 @@ def test_render_emits_wikilinks_for_artifacts(vault: Path) -> None: inp = build_weekly_input(week_end) rendered = render_weekly_input_for_prompt(inp) - # Wikilink form should be aliased: [[path|alias]] - assert "[[20-contexts/sanlam/calendar/artifacts/decisions/" in rendered - assert "|defer-simi]]" in rendered or "defer-simi]" in rendered + # Wikilink form should be aliased: [[path|alias]]. The alias is the + # humanized form of the slug (see _humanize_slug in worker/digest.py), + # so "defer-simi" → "Defer simi". + assert "[[20-contexts/sanlam/calendar/artifacts/decisions/defer-simi|" in rendered + assert "|Defer simi]]" in rendered # Type grouping should appear assert "decisions (1):" in rendered assert "action_items (1):" in rendered