tests: ensure occupants count is correct

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-09-11 10:52:14 +02:00
parent afd1f23ac3
commit 29b952a726
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2
2 changed files with 4 additions and 4 deletions

View file

@ -37,8 +37,8 @@ pub type Nick = String;
#[derive(Debug)]
pub struct Room {
jid: BareJid,
occupants: HashMap<BareJid, Occupant>,
pub jid: BareJid,
pub occupants: HashMap<BareJid, Occupant>,
}
impl Room {

View file

@ -142,7 +142,7 @@ async fn test_0045_join_presence_empty_room() {
assert_eq!(rooms.len(), 1);
match rooms.get(&roomjid) {
Some(_) => (),
Some(room) => assert_eq!(room.occupants.len(), 1),
None => panic!(),
}
}
@ -197,7 +197,7 @@ async fn test_0045_join_presence_nick_already_assigned() {
component.assert();
match rooms.get(&roomjid) {
Some(_) => (),
Some(room) => assert_eq!(room.occupants.len(), 1),
None => panic!(),
}
}