test(examples): assert escaped text exactly
Make v0 and kanban DOM-aware escaped-text checks exact instead of substring-based while preserving the no-rendered-tag assertions. req: html_safety/002 req: test/005
This commit is contained in:
@@ -301,7 +301,7 @@ mod tests {
|
||||
let rows = document.select(&selector("li[data-key]")).collect::<Vec<_>>();
|
||||
assert_eq!(rows.len(), 1);
|
||||
assert_eq!(rows[0].value().attr("data-key"), Some("7"));
|
||||
assert!(rows[0].text().collect::<String>().contains("<b>Ship v0</b>"));
|
||||
assert_eq!(rows[0].text().collect::<String>(), "<b>Ship v0</b>");
|
||||
assert!(document.select(&selector("b")).next().is_none());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user