diff --git a/src/route.rs b/src/route.rs index 626b09514..1f1aed471 100644 --- a/src/route.rs +++ b/src/route.rs @@ -442,6 +442,6 @@ mod tests { .method(Method::HEAD) .to_request(); let resp = call_success(&mut srv, req); - assert_eq!(resp.status(), StatusCode::NOT_FOUND); + assert_eq!(resp.status(), StatusCode::METHOD_NOT_ALLOWED); } } diff --git a/src/scope.rs b/src/scope.rs index bf3261f2f..4a894450c 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -598,7 +598,7 @@ mod tests { .method(Method::POST) .to_request(); let resp = block_on(srv.call(req)).unwrap(); - assert_eq!(resp.status(), StatusCode::NOT_FOUND); + assert_eq!(resp.status(), StatusCode::METHOD_NOT_ALLOWED); } #[test]