}
#[test]
fn array() {
assert_eq!(
MetadataHtml(&Value::Array(vec![
Value::Null,
Value::Null,
Value::Text("hello".to_string())
]))
.to_string(),
"
"
)
}
#[test]
fn map() {
assert_eq!(
MetadataHtml(&Value::Map(
vec![
(Value::Text("b".to_string()), Value::Null),
(
Value::Text("a".to_string()),
Value::Text("hello".to_string())
)
]
.into_iter()
.collect()
))
.to_string(),
"- b
- null
- a
- hello
"
);
assert_eq!(
MetadataHtml(&Value::Map(
vec![(Value::Text("<".to_string()), Value::Null),]
.into_iter()
.collect()
))
.to_string(),
"- <
- null
"
);
}
}