🚧 Prepare code for testing

This commit is contained in:
Manuel Cillero 2023-10-26 08:50:18 +02:00
parent 916e5d3300
commit d7762a10fa
8 changed files with 80 additions and 71 deletions

View file

@ -1,17 +0,0 @@
[package]
name = "tests"
version = "0.0.1"
edition = "2021"
authors = [
"Manuel Cillero <manuel@cillero.es>"
]
description = """\
Tests for PageTop.\
"""
homepage = "https://pagetop.cillero.es"
repository = "https://github.com/manuelcillero/pagetop"
license = "Apache-2.0 OR MIT"
[dependencies]
pagetop = { version = "0.0", path = "../pagetop", features = ["mysql"], default-features = false }

View file

@ -1 +0,0 @@
mod server;

View file

@ -1 +0,0 @@
mod health_check;

View file

@ -1,15 +0,0 @@
use pagetop::prelude::*;
struct HealthCheck;
impl ModuleTrait for HealthCheck {}
async fn spawn_app() {
let server = Application::prepare(&HealthCheck).unwrap().server();
let _ = actix_web::rt::spawn(server);
}
#[actix_web::test]
async fn health_check_works() {
spawn_app();
}