Prepare rocket requisites to start with
A basic index page with basic configuration and a rudimentary test.
This commit is contained in:
commit
6d247c63ba
6 changed files with 809 additions and 0 deletions
9
src/tests.rs
Normal file
9
src/tests.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
use rocket::{self, local::Client, routes};
|
||||
|
||||
#[test]
|
||||
fn index() {
|
||||
let rocket = rocket::ignite().mount("/", routes![super::index]);
|
||||
let client = Client::new(rocket).unwrap();
|
||||
let mut response = client.get("/").dispatch();
|
||||
assert_eq!(response.body_string(), Some("Hello, ldap0r!".into()));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue