1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

add test for duplicate dynamic segent name

This commit is contained in:
Rob Ede 2021-11-23 15:57:18 +00:00
parent bcbbc115aa
commit 9bdd334bb4
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933

View File

@ -1770,6 +1770,12 @@ mod tests {
match_methods_agree!(["/v{v}", "/ver/{v}"] => "", "s/v", "/v1", "/v1/xx", "/ver/i3/5", "/ver/1"); match_methods_agree!(["/v{v}", "/ver/{v}"] => "", "s/v", "/v1", "/v1/xx", "/ver/i3/5", "/ver/1");
} }
#[test]
#[should_panic]
fn duplicate_segment_name() {
ResourceDef::new("/user/{id}/post/{id}");
}
#[test] #[test]
#[should_panic] #[should_panic]
fn invalid_dynamic_segment_delimiter() { fn invalid_dynamic_segment_delimiter() {