12 lines
482 B
Python
12 lines
482 B
Python
from pathlib import Path
|
|
|
|
from roborto_accounting.cli.main import main
|
|
|
|
|
|
def test_document_sample_command_generates_approved_pdfs(tmp_path):
|
|
assert main(["document-samples", "--output", str(tmp_path)]) == 0
|
|
assert {path.name for path in tmp_path.glob("*.pdf")} == {
|
|
"invoice-sample.pdf", "quotation-sample.pdf", "cash-flow-sample.pdf", "profit-loss-sample.pdf", "letter-sample.pdf"
|
|
}
|
|
assert all(path.stat().st_size > 1000 for path in tmp_path.glob("*.pdf"))
|