I’ve been pretty busy as of late and even had some issues with the way I was trying to unit test validation. As you can see here, I was able to get some help from Joey on this and it has made me realize that I need to re-write my MonoRail Validation post to use the “correct” manner of validation. Even Oren agrees that the validation library in MonoRail works, it is just not the ideal way of doing it.
SENDING AN EMAIL
You have to do 3 things to send an email successfully:
1. Write your unit test showing your expectations of the code:
2. Set your SMTP server in the web.config file:
3. Make your test pass by adding the line to your controller’s action (in my case the ContactController):
DeliverEmail is build-into the MonoRail.Controller class. Use it. :)
AUTHENTICATION & AUTHORIZATION