Cookbook
Short recipes for one task each. Every recipe is a small app in examples/cookbook/ with its own quantum test suite: the code on its page is imported from the tested files, and what it shows as a result was produced by running it.
Testing the app
- A first test with quantum test — Test a page and its action in Quantum itself — visit, submit, check the flash, the table and the field error.
- Test data with test:given — Put the rows a test needs in its fresh database with test:given, and sign a user in with test:as.
- Testing what an action refuses — Test the field errors, the business rule and the success of an action — error=, message=, flash= and the table.
Files & mail
- Mail in development — Send mail from an action without a mail server while you develop — host: log writes each message to the log.
- When the mail server says no — Keep an order even when its confirmation e-mail cannot be sent — onerror=continue, and tell the visitor.