22 lines
533 B
Rust
22 lines
533 B
Rust
use rocket::http::Status;
|
|
|
|
#[test]
|
|
fn test_healthz() {
|
|
super::setup();
|
|
|
|
let client = super::client();
|
|
let response = client.get("/healthz").dispatch();
|
|
assert_eq!(response.status(), Status::Ok);
|
|
assert_eq!(response.into_string(), Some("UP".into()));
|
|
}
|
|
|
|
#[test]
|
|
fn test_not_found() {
|
|
super::setup();
|
|
|
|
let client = super::client();
|
|
let response = client.get("/bogus").dispatch();
|
|
assert_eq!(response.status(), Status::NotFound);
|
|
assert_eq!(response.into_string(), Some("Not Found\n".into()));
|
|
}
|