tests: ensure occupants count is correct
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
afd1f23ac3
commit
29b952a726
2 changed files with 4 additions and 4 deletions
|
@ -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 {
|
||||
|
|
|
@ -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!(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue