1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-05-09 16:10:42 +00:00

make all fields of response private, we're breaking change anyways

Closes #34
Related to #27
This commit is contained in:
Dominic 2021-01-14 18:45:32 +01:00
parent 44f3c9fe84
commit b7a1193333
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
9 changed files with 23 additions and 21 deletions

View file

@ -21,8 +21,8 @@ mod resource_error {
fn io_error() {
let err = Error::IoError(std::io::Error::last_os_error());
let res = err.into_response_error().unwrap();
assert_eq!(res.status, StatusCode::INTERNAL_SERVER_ERROR);
assert_eq!(res.mime, Some(APPLICATION_JSON));
assert_eq!(res.status(), StatusCode::INTERNAL_SERVER_ERROR);
assert_eq!(res.mime(), Some(&APPLICATION_JSON));
}
#[test]
@ -31,7 +31,7 @@ mod resource_error {
assert_eq!(&format!("{}", err), "Internal Server Error: Brocken");
let res = err.into_response_error().unwrap();
assert_eq!(res.status, StatusCode::INTERNAL_SERVER_ERROR);
assert_eq!(res.mime, None); // TODO shouldn't this be a json error message?
assert_eq!(res.status(), StatusCode::INTERNAL_SERVER_ERROR);
assert_eq!(res.mime(), None); // TODO shouldn't this be a json error message?
}
}