body: Test the serialise function.

This commit is contained in:
Emmanuel Gil Peyrot 2017-04-23 03:22:25 +01:00
parent cebccb363f
commit 7002578bc0

View file

@ -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));
}
}