fix gurtca post_json func

This commit is contained in:
Face
2025-08-25 13:33:42 +03:00
parent 257a88a914
commit 09d8ca77ac
3 changed files with 12 additions and 2 deletions

View File

@@ -570,10 +570,16 @@ mod tests {
assert!(!route.matches(&GurtMethod::POST, "/test"));
assert!(!route.matches(&GurtMethod::GET, "/other"));
assert!(!route.matches(&GurtMethod::GET, "/test?foo=bar"));
assert!(!route.matches(&GurtMethod::GET, "/test?page=1&limit=100"));
let wildcard_route = Route::get("/api/*");
assert!(wildcard_route.matches(&GurtMethod::GET, "/api/users"));
assert!(wildcard_route.matches(&GurtMethod::GET, "/api/posts"));
assert!(!wildcard_route.matches(&GurtMethod::GET, "/other"));
assert!(wildcard_route.matches(&GurtMethod::GET, "/api/users?id=123"));
assert!(wildcard_route.matches(&GurtMethod::GET, "/api/posts?page=2"));
}
}