mirror of
https://github.com/actix/actix-web.git
synced 2024-12-30 03:50:42 +00:00
Merge branch 'master' of github.com:actix/actix-web
This commit is contained in:
commit
484b00a0f9
1 changed files with 15 additions and 0 deletions
|
@ -66,6 +66,21 @@ fn test_simple() {
|
|||
assert_eq!(bytes, Bytes::from_static(STR.as_ref()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_with_query_parameter() {
|
||||
let mut srv = test::TestServer::new(
|
||||
|app| app.handler(|req: HttpRequest| match req.query().get("qp") {
|
||||
Some(_) => httpcodes::HTTPOk.build().finish(),
|
||||
None => httpcodes::HTTPBadRequest.build().finish(),
|
||||
}));
|
||||
|
||||
let request = srv.get().uri(srv.url("/?qp=5").as_str()).finish().unwrap();
|
||||
|
||||
let response = srv.execute(request.send()).unwrap();
|
||||
assert!(response.status().is_success());
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_no_decompress() {
|
||||
let mut srv = test::TestServer::new(
|
||||
|
|
Loading…
Reference in a new issue