test(cron): preserve rejected creation exit status

This commit is contained in:
Teknium
2026-09-07 03:01:22 -07:00
parent 39ed610f8c
commit ff175510c2
@@ -46,3 +46,10 @@ def test_invalid_creation_is_rejected_without_writes(tmp_path):
"action": "create", "schedule": "every 1h", "prompt": "invalid", **flags}))
assert result["success"] is False, (flags, result)
assert jobs.load_jobs() == []
from types import SimpleNamespace
from hermes_cli.main import cmd_cron
args = SimpleNamespace(cron_command="create", schedule="every 1h", prompt="invalid",
paused=False, paused_reason="orphan")
assert cmd_cron(args) == 1
assert jobs.load_jobs() == []