We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3af9da commit 1b6bb50Copy full SHA for 1b6bb50
tests/health_check.rs
@@ -0,0 +1,20 @@
1
+#[macro_use]
2
+extern crate rocket;
3
+
4
+use rocket::http::Status;
5
+use rocket::local::blocking::Client;
6
+use rocket::{Build, Rocket};
7
+use std::io::Read;
8
9
+fn spawn_app() -> Rocket<Build> {
10
+ bibimbap_backend::run()
11
+}
12
13
+#[test]
14
+fn health_check_works() {
15
+ let client = Client::tracked(spawn_app()).expect("Failed to create client");
16
+ let response = client.get(uri!("/health_check")).dispatch();
17
18
+ assert_eq!(response.status(), Status::Ok);
19
+ assert_eq!(response.bytes().count(), 0);
20
0 commit comments