What clients hand Lanna Desk for a while (a passport for an extension, a signed contract, a title deed) gets a code and a label (OR-2026-0001), and a record of where it is: held at a place in the office, out with someone such as Chiang Mai Immigration until a date, or returned. - Migration 0013: table originals, owned by a client or a person; the database refuses a delete and a change of what it is, whose it is and how it came. - Every intake and move is a journal entry starting with the code; the item's page reads its history from there. The audit log has the new entity "original", with a view when a person's original is shown. - Pages: Legal, Originals (in our care, out, held, returned, all; a find box for a typed or scanned code), the item's page with the move form, intake from a client's or a person's page, and the label with a QR code to the item's page. Cards on the client's and the person's pages. - A field can show only for some choices of a selection (data-shown-when), so the move form asks "Where it lies", "With whom" or "Returned to" as fits. - Demo data: a passport out at Immigration, a title deed and a house registration held, a company certificate returned. - PLAN: phase 12, with step 2 (the inbox that files a pile of scans) and step 3 planned.
41 lines
984 B
Rust
41 lines
984 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 originals;
|
|
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"
|
|
);
|
|
}
|
|
}
|