diff --git a/src/body.rs b/src/body.rs index f170cd38..7703d655 100644 --- a/src/body.rs +++ b/src/body.rs @@ -29,6 +29,7 @@ mod tests { use minidom::Element; use error::Error; use body; + use ns; #[test] fn test_simple() { @@ -69,4 +70,11 @@ mod tests { }; assert_eq!(message, "Unknown attribute in body element."); } + + #[test] + fn test_serialise() { + let body = body::Body::from("Hello world!"); + let elem = body::serialise(&body); + assert!(elem.is("body", ns::JABBER_CLIENT)); + } }