fix gurtca post_json func
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user