Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update Testing documentation to link to How to Test Email/Mailer #9634

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -1975,6 +1975,16 @@ console.log(testCacheClient.storage)
This is mainly helpful when you are testing for a very specific value, or have edgecases in how the serialization/deserialization works in the cache.


## Testing Mailer

If your project uses [RedwoodJS Mailer](./mailer.md) to send emails, you can [also write tests](./mailer.md#testing) to make sure that email:

* is sent to an sandbox inbox
* renders properly
* sets the expected to, from, cc, bcc, subject attributes based on the email sending logic
* checks that the html and text content is set correctly

Since these tests send mail to a sandbox inbox, you can be confident that no emails accidentally get sent into the wild as part of your test or CI runs.


## Wrapping Up
Expand Down
Loading