mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
ping: Add a serialise test.
This commit is contained in:
parent
b5e41a7074
commit
ed53f452c3
1 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,13 @@ mod tests {
|
|||
Ping::try_from(elem).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_serialise() {
|
||||
let elem1 = Element::from(Ping);
|
||||
let elem2: Element = "<ping xmlns='urn:xmpp:ping'/>".parse().unwrap();
|
||||
assert_eq!(elem1, elem2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invalid() {
|
||||
let elem: Element = "<ping xmlns='urn:xmpp:ping'><coucou/></ping>".parse().unwrap();
|
||||
|
|
Loading…
Reference in a new issue