[#13] added some more unit tests, hated life for a bit
This commit is contained in:
parent
2e73d88ae9
commit
e4b8be3ba3
4 changed files with 32 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
/// In here, any non-unit tests are placed.
|
||||
use rocket::http::Status;
|
||||
use rocket::local::Client;
|
||||
|
||||
|
|
@ -12,9 +13,11 @@ fn test_404_response() {
|
|||
let response = client.get("/").dispatch();
|
||||
|
||||
assert_eq!(response.status(), Status::NotFound);
|
||||
// TODO add text check as well
|
||||
}
|
||||
|
||||
/// Test 404 on invalid parameters
|
||||
// TODO make this check a 400 instead
|
||||
#[test]
|
||||
fn test_invalid_parameters() {
|
||||
let client = Client::new(rocket()).expect("valid rocket instance");
|
||||
|
|
|
|||
Reference in a new issue