diff --git a/xmpp-parsers/src/forwarding.rs b/xmpp-parsers/src/forwarding.rs index f51c6bbd..1b786ac1 100644 --- a/xmpp-parsers/src/forwarding.rs +++ b/xmpp-parsers/src/forwarding.rs @@ -74,6 +74,26 @@ mod tests { #[test] fn test_serialize_with_delay_and_stanza() { - assert!(false); + let reference: Element = "" + .parse() + .unwrap(); + + let elem: Element = "" + .parse() + .unwrap(); + let message = Message::try_from(elem).unwrap(); + + let elem: Element = "" + .parse() + .unwrap(); + let delay = Delay::try_from(elem).unwrap(); + + let forwarded = Forwarded { + delay: Some(delay), + stanza: Some(message) + }; + + let serialized: Element = forwarded.into(); + assert_eq!(serialized, reference); } }