diff --git a/xmpp-parsers/src/muc/user.rs b/xmpp-parsers/src/muc/user.rs index 35cd1267..d457b5fc 100644 --- a/xmpp-parsers/src/muc/user.rs +++ b/xmpp-parsers/src/muc/user.rs @@ -690,6 +690,36 @@ mod tests { #[test] fn test_serialize_item() { - assert!(false); + let reference: Element = "foobar" + .parse() + .unwrap(); + + let elem: Element = "" + .parse() + .unwrap(); + let actor = Actor::try_from(elem).unwrap(); + + let elem: Element = "" + .parse() + .unwrap(); + let continue_ = Continue::try_from(elem).unwrap(); + + let elem: Element = "foobar" + .parse() + .unwrap(); + let reason = Reason::try_from(elem).unwrap(); + + let item = Item { + affiliation: Affiliation::Member, + role: Role::Moderator, + jid: None, + nick: None, + actor: Some(actor), + reason: Some(reason), + continue_: Some(continue_), + }; + + let serialized: Element = item.into(); + assert_eq!(serialized, reference); } }