test(cli): fix stale group-email parse assertion

The M5.5 shared-group-secret work made a [group] [[triggers.email]] template
parse successfully (it materializes per descendant app; the inbound secret is
resolved against the group's own store server-side at apply). The unit test
still asserted the old parse-time rejection and had been failing on main under
`cargo test --workspace`. Update it to assert the current behavior: parse
accepts a group email template, like the group cron template above it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-07-06 20:01:34 +02:00
parent ae98063f87
commit f1730a1ba0

View File

@@ -904,13 +904,16 @@ mod tests {
)
.expect("group cron template parses");
assert_eq!(cron.triggers.cron.len(), 1);
// ...but an email template on a group is still rejected (per-app secret).
let err = Manifest::parse(
// §4.5 M5.5: a group email template is now ALLOWED too — it materializes
// per descendant app and resolves its `inbound_secret_ref` against the
// GROUP's own secret store at apply (the server rejects it there if the
// secret is unset). Parse no longer refuses it.
let email = Manifest::parse(
"[group]\nslug = \"acme\"\nname = \"ACME\"\n\n\
[[triggers.email]]\nscript = \"shared\"\ninbound_secret_ref = \"sig\"\n",
)
.expect_err("group email template is rejected");
assert!(err.to_string().contains("email"), "got: {err}");
.expect("group email template parses");
assert_eq!(email.triggers.email.len(), 1);
// Neither / both is rejected.
Manifest::parse("[vars]\nx = 1\n").expect_err("no [app] or [group]");