diff --git a/xmpp-parsers/src/cert_management.rs b/xmpp-parsers/src/cert_management.rs
index 9478b020..d93ebb37 100644
--- a/xmpp-parsers/src/cert_management.rs
+++ b/xmpp-parsers/src/cert_management.rs
@@ -230,21 +230,68 @@ mod tests {
#[test]
fn test_serialize_item() {
- assert!(false);
+ let reference: Element = "- Mobile ClientAAAA
"
+ .parse()
+ .unwrap();
+
+ let item = Item {
+ name: Name::from_str("Mobile Client").unwrap(),
+ cert: Cert {
+ data: b"\0\0\0".to_vec(),
+ },
+ no_cert_management: false,
+ users: None,
+ };
+
+ let serialized: Element = item.into();
+ assert_eq!(serialized, reference);
}
#[test]
fn test_serialize_append() {
- assert!(false);
+ let reference: Element = "Mobile ClientAAAA"
+ .parse()
+ .unwrap();
+
+ let append = Append {
+ name: Name::from_str("Mobile Client").unwrap(),
+ cert: Cert {
+ data: b"\0\0\0".to_vec(),
+ },
+ no_cert_management: false,
+ };
+
+ let serialized: Element = append.into();
+ assert_eq!(serialized, reference);
}
#[test]
fn test_serialize_disable() {
- assert!(false);
+ let reference: Element =
+ "Mobile Client"
+ .parse()
+ .unwrap();
+
+ let disable = Disable {
+ name: Name::from_str("Mobile Client").unwrap(),
+ };
+
+ let serialized: Element = disable.into();
+ assert_eq!(serialized, reference);
}
#[test]
fn test_serialize_revoke() {
- assert!(false);
+ let reference: Element =
+ "Mobile Client"
+ .parse()
+ .unwrap();
+
+ let revoke = Revoke {
+ name: Name::from_str("Mobile Client").unwrap(),
+ };
+
+ let serialized: Element = revoke.into();
+ assert_eq!(serialized, reference);
}
}