test_0045_join_presence_empty_room: ensure room is created

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-09-10 12:43:34 +02:00
parent b29ac6b274
commit 8fececd97f
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -78,6 +78,7 @@ async fn test_0045_join_presence_empty_room() {
.clone()
.with_node("room")
.with_resource("nick");
let roomjid = COMPONENT_JID.clone().with_node("room");
// <x xmlns='http://jabber.org/protocol/muc'/>
let join: Element = Presence::new(PresenceType::None)
@ -120,4 +121,10 @@ async fn test_0045_join_presence_empty_room() {
handle_stanza(&mut component, &mut rooms).await.unwrap();
component.assert();
assert_eq!(rooms.len(), 1);
match rooms.get(&roomjid) {
Some(_) => (),
None => panic!(),
}
}