diff --git a/src/auth.rs b/src/auth.rs index 4c019b7..39b4690 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -87,7 +87,7 @@ mod tests { } #[actix_rt::test] - async fn test_login_reports_400_when_user_does_not_exist() { + async fn test_login_reports_404_when_user_does_not_exist() { let dao = TestUserDao::new(); dao.create_user("user", "password"); diff --git a/src/database/mod.rs b/src/database/mod.rs index 96f5915..ea9dd11 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -175,10 +175,7 @@ pub mod testhelpers { impl BodyReader for ResponseBody { fn read_to_str(&self) -> &str { match self { - ResponseBody::Body(body) => match body { - Body::Bytes(b) => std::str::from_utf8(&b).unwrap(), - _ => panic!("Unknown response body content"), - }, + ResponseBody::Body(Body::Bytes(ref b)) => std::str::from_utf8(b).unwrap(), _ => panic!("Unknown response body"), } }