tests for multiple path failure

This commit is contained in:
realaravinth 2021-05-13 19:42:19 +05:30
parent 314ffd71c9
commit b91607bfb2
No known key found for this signature in database
GPG Key ID: AD9F0F08E855ED88
2 changed files with 13 additions and 0 deletions

View File

@ -27,4 +27,11 @@ async fn five() -> String {
"Hello World!".to_owned()
}
const SIX: &str = "/six";
#[get("/six", path="SIX")]
async fn six() -> String {
"Hello World!".to_owned()
}
fn main() {}

View File

@ -27,3 +27,9 @@ error: HTTP method forbidden here. To handle multiple methods, use `route` inste
|
25 | #[delete("/five", method="GET")]
| ^^^^^^^^^^^^
error: Multiple paths specified! Should be only one!
--> $DIR/simple-fail.rs:32:20
|
32 | #[get("/six", path="SIX")]
| ^^^^^