Merge branch 'master' of gitlab.com:shockrah/freechat
This commit is contained in:
commit
a40321962f
@ -56,7 +56,11 @@ mod test {
|
||||
($client:expr, $file:expr) => {
|
||||
let response = $client.get($file).dispatch();
|
||||
assert_eq!(response.status(), Status::Ok);
|
||||
}
|
||||
};
|
||||
($client:expr, $file:expr, $code:expr) => {
|
||||
let response = $client.get($file).dispatch();
|
||||
assert_eq!(response.status(), $code);
|
||||
};
|
||||
}
|
||||
#[test]
|
||||
fn pageroutes_get() {
|
||||
@ -73,9 +77,16 @@ mod test {
|
||||
check_get!(client, "/static/css/about.css");
|
||||
}
|
||||
|
||||
// this one is meant to fail for now because we don't have any js to serve
|
||||
#[test]
|
||||
fn static_media_get() {
|
||||
let client = Client::new(rocket()).expect("Valid rocket instance");
|
||||
check_get!(client, "/static/media/favicon.png");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn static_js_get() {
|
||||
let client = Client::new(rocket()).expect("Valid rocket instance");
|
||||
check_get!(client, "/static/js/jquery.js", Status::NotFound);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user