Skip to content

Commit 9bdd334

Browse files
committed
add test for duplicate dynamic segent name
1 parent bcbbc11 commit 9bdd334

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

actix-router/src/resource.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,6 +1770,12 @@ mod tests {
17701770
match_methods_agree!(["/v{v}", "/ver/{v}"] => "", "s/v", "/v1", "/v1/xx", "/ver/i3/5", "/ver/1");
17711771
}
17721772

1773+
#[test]
1774+
#[should_panic]
1775+
fn duplicate_segment_name() {
1776+
ResourceDef::new("/user/{id}/post/{id}");
1777+
}
1778+
17731779
#[test]
17741780
#[should_panic]
17751781
fn invalid_dynamic_segment_delimiter() {

0 commit comments

Comments
 (0)