We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d08490d commit 9d8e46dCopy full SHA for 9d8e46d
tests/index.rs
@@ -30,6 +30,19 @@ async fn test_access_config_forbidden() {
30
);
31
}
32
33
+#[actix_web::test]
34
+async fn test_404() {
35
+ for f in [
36
+ "/does_not_exist.sql",
37
+ "/does_not_exist.html",
38
+ "/does_not_exist/",
39
+ ] {
40
+ let resp_result = req_path(f).await;
41
+ let resp = resp_result.unwrap_err().error_response();
42
+ assert_eq!(resp.status(), http::StatusCode::NOT_FOUND, "{f} isnt 404");
43
+ }
44
+}
45
+
46
async fn req_path(path: &str) -> Result<actix_web::dev::ServiceResponse, actix_web::Error> {
47
init_log();
48
let config = test_config();
0 commit comments