mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 08:22:59 +01:00
update tests
This commit is contained in:
parent
a8f3dec527
commit
f90ca868ca
@ -1022,8 +1022,7 @@ mod tests {
|
||||
let mut rt = actix_rt::Runtime::new().unwrap();
|
||||
let mut req = TestRequest::with_header(header::CONTENT_LENGTH, "11")
|
||||
.set_payload(Bytes::from_static(b"hello=world"))
|
||||
.finish()
|
||||
.into();
|
||||
.to_from();
|
||||
|
||||
let s = rt.block_on(Bytes::from_request(&mut req)).unwrap();
|
||||
assert_eq!(s, Bytes::from_static(b"hello=world"));
|
||||
@ -1034,8 +1033,7 @@ mod tests {
|
||||
let mut rt = actix_rt::Runtime::new().unwrap();
|
||||
let mut req = TestRequest::with_header(header::CONTENT_LENGTH, "11")
|
||||
.set_payload(Bytes::from_static(b"hello=world"))
|
||||
.finish()
|
||||
.into();
|
||||
.to_from();
|
||||
|
||||
let s = rt.block_on(String::from_request(&mut req)).unwrap();
|
||||
assert_eq!(s, "hello=world");
|
||||
@ -1050,8 +1048,7 @@ mod tests {
|
||||
)
|
||||
.header(header::CONTENT_LENGTH, "11")
|
||||
.set_payload(Bytes::from_static(b"hello=world"))
|
||||
.finish()
|
||||
.into();
|
||||
.to_from();
|
||||
|
||||
let s = rt.block_on(Form::<Info>::from_request(&mut req)).unwrap();
|
||||
assert_eq!(s.hello, "world");
|
||||
|
@ -311,7 +311,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_preds() {
|
||||
let r = TestRequest::default().method(Method::TRACE).request();
|
||||
let r = TestRequest::default().method(Method::TRACE).to_request();
|
||||
|
||||
assert!(Not(Get()).check(&r,));
|
||||
assert!(!Not(Trace()).check(&r,));
|
||||
|
Loading…
Reference in New Issue
Block a user