Skip to content
This repository was archived by the owner on Jul 16, 2021. It is now read-only.

[Proposal] When using Mail::fake(), render views to check for exceptions #720

Closed
mateusjatenee opened this issue Aug 8, 2017 · 4 comments

Comments

@mateusjatenee
Copy link

One thing that happens when you use Mail::fake() is that the mailables are just stored in an array. Perhaps we could build the views so the user knows if there is a syntax error or something? what do you guys think?

@thecrypticace
Copy link

I would typically write separate tests of the mailable that don't use Mail::fake but something like the log mail driver (or mail trap — that's a fairly decent one to use too) to ensure that they build and send correctly.

@mateusjatenee
Copy link
Author

@thecrypticace that's what I do, I just imagine a lot of people don't and get some errors on production (making little changes and relying on the tests that don't actually test that)

@thecrypticace
Copy link

I'll leave this one for others to decide.

My opinion: Sounds like a good idea on the face of it but it is not necessary as there's an existing way to test it and I don't see a major benefit to rendering views behind the scenes when they're not going to actually be used (or useful afaict) for the tests that use Mail::fake.

@taylorotwell
Copy link
Member

No plans on changing this for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants