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:
parent
44f3c9fe84
commit
b7a1193333
9 changed files with 23 additions and 21 deletions
|
@ -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?
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue