tests are more specific at this point yes i think so
This commit is contained in:
parent
b6eaada2bf
commit
ba166cf281
@ -59,18 +59,23 @@ mod test {
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
fn test_homepage() {
|
||||
fn pageroutes_get() {
|
||||
// Just make sure that when request the home page we actually get the html back
|
||||
let client = Client::new(rocket()).expect("Valid rocket instance");
|
||||
let response = client.get("/").dispatch();
|
||||
assert_eq!(response.status(), Status::Ok);
|
||||
check_get!(client, "/");
|
||||
check_get!(client, "/about");
|
||||
}
|
||||
// Next we test the static resource routes
|
||||
#[test]
|
||||
fn statics() {
|
||||
fn static_css_get() {
|
||||
let client = Client::new(rocket()).expect("Valid rocket instance");
|
||||
check_get!(client, "/static/index.css");
|
||||
check_get!(client, "/static/css/about.css");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn static_media_get() {
|
||||
let client = Client::new(rocket()).expect("Valid rocket instance");
|
||||
check_get!(client, "/static/media/favicon.png");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user