mirror of
https://github.com/storytold/craft-anything.git
synced 2026-11-19 05:50:53 +01:00
Replays #602–#605. HAR reports redact percent-encoded credential names and declared secrets in every kept field, count decoded body bytes, and template only real dates in API paths; the stand-in backend matches older recordings with the current query rules. Co-authored-by: Afloat <132809511+Afloat16@users.noreply.github.com>
13 lines
534 B
Rust
13 lines
534 B
Rust
use craft_anything_analysis::web_har::path_template;
|
|
|
|
#[test]
|
|
fn regression_only_calendar_dates_share_a_date_template() {
|
|
for date in ["2024-02-29", "2000-02-29", "2026-11-03", "2026-04-30"] {
|
|
assert_eq!(path_template(&format!("/reports/{date}")), "/reports/{date}");
|
|
}
|
|
for literal in ["2026-11-news", "2026-11-03-extra", "2026-02-29", "1900-02-29", "2026-13-01", "2026-00-01", "2026-04-31", "2026-01-00"] {
|
|
let path = format!("/reports/{literal}");
|
|
assert_eq!(path_template(&path), path);
|
|
}
|
|
}
|