diff --git a/src/muc/muc.rs b/src/muc/muc.rs index 4a6fda40..5132adbf 100644 --- a/src/muc/muc.rs +++ b/src/muc/muc.rs @@ -52,6 +52,7 @@ impl From for Element { #[cfg(test)] mod tests { use super::*; + use compare_elements::NamespaceAwareCompare; #[test] fn test_muc_simple() { @@ -98,7 +99,11 @@ mod tests { coucou " .parse().unwrap(); + let elem1 = elem.clone(); let muc = Muc::try_from(elem).unwrap(); assert_eq!(muc.password, Some("coucou".to_owned())); + + let elem2 = Element::from(muc); + assert!(elem1.compare_to(&elem2)); } }