1
0
mirror of https://github.com/actix/actix-website synced 2025-01-22 16:15:56 +01:00

Merge pull request #39 from shakyShane/patch-1

Update first testing example
This commit is contained in:
Nikolay Kim 2018-09-18 10:15:13 -07:00 committed by GitHub
commit f420916025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,12 +31,12 @@ fn index(req: &HttpRequest) -> HttpResponse {
fn main() {
let resp = test::TestRequest::with_header("content-type", "text/plain")
.run(index)
.run(&index)
.unwrap();
assert_eq!(resp.status(), http::StatusCode::OK);
let resp = test::TestRequest::default()
.run(index)
.run(&index)
.unwrap();
assert_eq!(resp.status(), http::StatusCode::BAD_REQUEST);
}