avatar: Fix build with --features=disable-validation.

This commit is contained in:
Emmanuel Gil Peyrot 2019-01-25 03:45:48 +01:00
parent 35fccafc09
commit b6c7a06edd

View file

@ -106,9 +106,10 @@ mod tests {
assert_eq!(data.data, b"\0\0\0"); assert_eq!(data.data, b"\0\0\0");
} }
#[cfg(not(feature = "disable-validation"))]
#[test] #[test]
fn test_invalid() { fn test_invalid() {
let elem: Element = "<data xmlns='urn:xmpp:avatar:data' id='coucou'>" let elem: Element = "<data xmlns='urn:xmpp:avatar:data' id='coucou'/>"
.parse() .parse()
.unwrap(); .unwrap();
let error = Data::try_from(elem).unwrap_err(); let error = Data::try_from(elem).unwrap_err();