🚧 Prepare code for testing
This commit is contained in:
parent
916e5d3300
commit
d7762a10fa
8 changed files with 80 additions and 71 deletions
|
|
@ -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 }
|
||||
|
|
@ -1 +0,0 @@
|
|||
mod server;
|
||||
|
|
@ -1 +0,0 @@
|
|||
mod health_check;
|
||||
|
|
@ -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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue