diff --git a/server/src/main.rs b/server/src/main.rs index 6eb89c1..e7319cb 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -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"); } }