mirror of https://github.com/fafhrd91/actix-web
Updated the tests to match the new signature
This commit is contained in:
parent
539e86a544
commit
a992de888e
|
|
@ -505,7 +505,10 @@ mod tests {
|
||||||
.set_form(&payload)
|
.set_form(&payload)
|
||||||
.to_request();
|
.to_request();
|
||||||
|
|
||||||
assert_eq!(req.content_type(), "application/x-www-form-urlencoded");
|
assert_eq!(
|
||||||
|
req.content_type().unwrap(),
|
||||||
|
"application/x-www-form-urlencoded"
|
||||||
|
);
|
||||||
|
|
||||||
let result: Person = call_and_read_body_json(&app, req).await;
|
let result: Person = call_and_read_body_json(&app, req).await;
|
||||||
assert_eq!(&result.id, "12345");
|
assert_eq!(&result.id, "12345");
|
||||||
|
|
@ -549,7 +552,7 @@ mod tests {
|
||||||
.set_json(&payload)
|
.set_json(&payload)
|
||||||
.to_request();
|
.to_request();
|
||||||
|
|
||||||
assert_eq!(req.content_type(), "application/json");
|
assert_eq!(req.content_type(), Some("application/json"));
|
||||||
|
|
||||||
let result: Person = call_and_read_body_json(&app, req).await;
|
let result: Person = call_and_read_body_json(&app, req).await;
|
||||||
assert_eq!(&result.id, "12345");
|
assert_eq!(&result.id, "12345");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue