//! Integration tests: one binary, every file a module (`autotests = false`). //! The database tests need `DATABASE_URL` (a PostgreSQL role that may create //! databases); each `#[sqlx::test]` gets its own database. mod agreements; mod auth; mod bucket; mod client; mod common; mod companies; mod deadlines; mod documents; mod garage; mod legal; mod mrz_photo; mod notifications; mod pack; mod pages; mod papers; mod people; mod records; #[test] fn every_test_file_is_a_module() { let main = include_str!("main.rs"); for entry in std::fs::read_dir(concat!(env!("CARGO_MANIFEST_DIR"), "/tests")).unwrap() { let path = entry.unwrap().path(); let name = path.file_stem().unwrap().to_string_lossy().into_owned(); if name == "main" { continue; } assert!( main.contains(&format!("mod {name};")), "tests/{name} is not declared in tests/main.rs" ); } }