feat: add reminder edit and delete commands

This commit is contained in:
Adolfo Reyna
2026-08-17 11:18:55 -04:00
parent bdf3b55a98
commit c445093186
2 changed files with 100 additions and 0 deletions
+36
View File
@@ -248,6 +248,42 @@ def test_cli_reminders_no_mcp_tool_call_remaining():
assert 'call_macmini_tool("reminders_create"' not in src
def test_cli_reminders_edit_uses_remindctl(monkeypatch):
captured = {}
def fake_run(args):
captured["args"] = args
return {"updated": {"id": "r1", "title": "New title"}}
monkeypatch.setattr("reyna_cli.cli.run_remindctl", fake_run)
res = runner.invoke(app, ["macmini", "reminders", "edit", "r1", "--title", "New title", "--due", "tomorrow", "--json"])
assert res.exit_code == 0
assert captured["args"] == ["edit", "r1", "--title", "New title", "--due", "tomorrow", "--json", "--no-input"]
assert json.loads(res.stdout)["source"] == "remindctl"
def test_cli_reminders_delete_requires_force(monkeypatch):
res = runner.invoke(app, ["macmini", "reminders", "delete", "r1", "--json"])
assert res.exit_code == 1
assert "--force" in res.stdout
def test_cli_reminders_delete_uses_remindctl_with_force(monkeypatch):
captured = {}
def fake_run(args):
captured["args"] = args
return {"deleted": ["r1"]}
monkeypatch.setattr("reyna_cli.cli.run_remindctl", fake_run)
res = runner.invoke(app, ["macmini", "reminders", "delete", "r1", "--force", "--json"])
assert res.exit_code == 0
assert captured["args"] == ["delete", "r1", "--force", "--json", "--no-input"]
def test_privacy_host_cli_has_reminders_authorize():
res = runner.invoke(app, ["privacy-host", "--help"])
assert res.exit_code == 0