infoserv: type the news kind as an enum at the store boundary
All checks were successful
CI / check (push) Successful in 3m53s

This commit is contained in:
Jean Chevronnet 2026-07-17 13:53:53 +00:00
parent ee95225eaf
commit 7a5f1502a4
No known key found for this signature in database
11 changed files with 49 additions and 31 deletions

View file

@ -5160,10 +5160,10 @@ fn infoserv_posts_a_bulletin_admin_only() {
svc_login(&mut e, "alice");
// Not an oper yet: refused.
assert!(svc_ask(&mut e, "42SAAAAAJ", "POST scheduled maintenance tonight").iter().any(|l| l.contains("Access denied")));
assert_eq!(e.db.news("logon").len(), 0);
assert_eq!(e.db.news(NewsKind::Logon).len(), 0);
svc_oper(&mut e, "alice");
svc_ask(&mut e, "42SAAAAAJ", "POST scheduled maintenance tonight");
assert_eq!(e.db.news("logon").len(), 1, "bulletin posted");
assert_eq!(e.db.news(NewsKind::Logon).len(), 1, "bulletin posted");
}
#[test]