thentos
thentos copied to clipboard
We should be able to check what emails are sent in the test suite
So far sending emails in test mode amounts to setting sendmail_path
to the command cat
.
This seems to provide no convenient way to check the contents of the emails being sent.
The workaround would be to set the log path in Thentos.Test.Config
to /tmp/my-log
.
A slightly better (and easy to implement) way: Set log path to something inside the temp dir created for this test. Provide a helper function that reads that dir.
A cool way: Write a logger that logs to Chan
instead of to the file system or stdout. Provide helpers to read that Chan
.