fix test problem
This commit is contained in:
@@ -84,7 +84,7 @@ fn body_as_json_deserialize() {
|
|||||||
hello: String,
|
hello: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
test::set_handler("/body_as_json", |_unit| {
|
test::set_handler("/body_as_json_deserialize", |_unit| {
|
||||||
test::make_response(
|
test::make_response(
|
||||||
200,
|
200,
|
||||||
"OK",
|
"OK",
|
||||||
@@ -92,7 +92,7 @@ fn body_as_json_deserialize() {
|
|||||||
"{\"hello\":\"world\"}".to_string().into_bytes(),
|
"{\"hello\":\"world\"}".to_string().into_bytes(),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
let resp = get("test://host/body_as_json").call();
|
let resp = get("test://host/body_as_json_deserialize").call();
|
||||||
let json = resp.into_json_deserialize::<Hello>().unwrap();
|
let json = resp.into_json_deserialize::<Hello>().unwrap();
|
||||||
assert_eq!(json.hello, "world");
|
assert_eq!(json.hello, "world");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user