infoserv: type the news kind as an enum at the store boundary
All checks were successful
CI / check (push) Successful in 3m53s
All checks were successful
CI / check (push) Successful in 3m53s
This commit is contained in:
parent
ee95225eaf
commit
7a5f1502a4
11 changed files with 49 additions and 31 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue