Files
visa/tests/main.rs
T
grabowski 329b181c4f
CI / secret scan (push) Successful in 8s
CI / fmt, clippy, tests (push) Successful in 1m23s
CI / release (push) Skipped
Demo mode (VISA_DEMO=1) for demoapp.lannadesk.com
For a public demo: no login on any address, everyone is "Demo visitor"
(actor demo), a note at the top of every page, the back office's and the
client's (#demo-note), and the invented demo data added at start when
the database is empty (the server drops it every night). Every file
upload is refused with a message (documents, the office photo, the
client's uploads; a contract version keeps its text without the file),
a mail server in its settings is refused, so nothing leaves it, and it
needs a place for the files and their key (the demo's own files and the
signed copies). seed-demo also runs in it. Sign out leads home.

Checked: config test (address, files, no mail), tests/demo.rs (the note,
an upload refused and nothing kept, a version with text only, the
journal's actor), a local run on an empty database (seeds itself: 27
documents, the clients and contracts) and screenshots light and dark,
desk and phone (PROBLEMS: 0).
2026-11-23 11:03:40 +07:00

40 lines
969 B
Rust

//! 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 demo;
mod documents;
mod fuzz_cases;
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"
);
}
}