♻️ Major code restructuring
This commit is contained in:
parent
a96e203bb3
commit
fa66d628a0
221 changed files with 228 additions and 315 deletions
2
tests/main.rs
Normal file
2
tests/main.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#[cfg(test)]
|
||||
mod server;
|
||||
15
tests/server/health_check.rs
Normal file
15
tests/server/health_check.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
#[derive(AssignHandle)]
|
||||
struct HealthCheck;
|
||||
|
||||
impl PackageTrait for HealthCheck {}
|
||||
|
||||
#[pagetop::test]
|
||||
async fn health_check_works() {
|
||||
let app = service::test::init_service(Application::prepare(&HealthCheck).unwrap().test()).await;
|
||||
let req = service::test::TestRequest::get().uri("/").to_request();
|
||||
let _resp = service::test::call_service(&app, req).await;
|
||||
|
||||
// assert_eq!("OK", "OK");
|
||||
}
|
||||
1
tests/server/mod.rs
Normal file
1
tests/server/mod.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
mod health_check;
|
||||
Loading…
Add table
Add a link
Reference in a new issue