mirror of https://github.com/rwf2/Rocket.git
12 lines
330 B
Rust
12 lines
330 B
Rust
|
use rocket;
|
||
|
use rocket::routes;
|
||
|
use rocket::local::Client;
|
||
|
|
||
|
#[test]
|
||
|
fn hello_world() {
|
||
|
let rocket = rocket::ignite().mount("/", routes![super::hello]);
|
||
|
let client = Client::new(rocket).unwrap();
|
||
|
let mut response = client.get("/").dispatch();
|
||
|
assert_eq!(response.body_string(), Some("Hello, Rust 2018!".into()));
|
||
|
}
|