mirror of https://github.com/fafhrd91/actix-web
chore: json unit-test patch
This commit is contained in:
parent
83e521c933
commit
f842583861
|
@ -616,7 +616,7 @@ mod tests {
|
|||
}
|
||||
));
|
||||
|
||||
let (req, mut pl) = TestRequest::default()
|
||||
let (mut req, mut pl) = TestRequest::default()
|
||||
.insert_header((
|
||||
header::CONTENT_TYPE,
|
||||
header::HeaderValue::from_static("application/json"),
|
||||
|
@ -624,6 +624,7 @@ mod tests {
|
|||
.set_payload(Bytes::from_static(&[0u8; 1000]))
|
||||
.to_http_parts();
|
||||
|
||||
req.head_mut().headers_mut().remove(header::CONTENT_LENGTH);
|
||||
let json = JsonBody::<MyObject>::new(&req, &mut pl, None, true)
|
||||
.limit(100)
|
||||
.await;
|
||||
|
|
Loading…
Reference in New Issue