test(axum): close page edge-case mutants
Prove partial constructor defaults, missing multipart-boundary rejection, first-root fingerprint replacement, and unchanged non-root HTML through public and nearest-boundary paths. req: page_swap/001 req: multipart/003 req: abi/005
This commit is contained in:
@@ -1609,6 +1609,18 @@ mod tests {
|
||||
.expect("root element is rendered");
|
||||
assert_eq!(root.value().attr("data-hemx-fp"), Some("1"));
|
||||
assert_eq!(root.text().collect::<String>(), "Docs");
|
||||
assert_eq!(html.matches("data-hemx-fp=").count(), 1);
|
||||
assert!(!html.contains("data-hemx-fp=\"99\""));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fingerprint_injection_leaves_html_without_a_hemx_root_unchanged() {
|
||||
let html = "<main>Docs</main>".to_owned();
|
||||
assert_eq!(
|
||||
html_with_root_fingerprint(html.clone(), BuildFingerprint(99)),
|
||||
html
|
||||
);
|
||||
// test req: abi/005
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user