ActionMailer integration + Test environment
I'm using ActionMailer integration as per the docs. My email gets sent just fine in development and production. But what about the testing environment? What do folks do for automated testing with Postageapp?
Thanks.
2 Posted by Samuel Wong on 30 Dec, 2011 12:00 AM
I should mention I'm on Rails 3.1 and I use RSpec 2 for testing.
Support Staff 3 Posted by Tom Walsham on 30 Dec, 2011 01:58 AM
Hey Samuel,
Thanks for using PostageApp!
Unfortunately, I am not equipped to answer your question properly, so I have asked one of the developers to take a look and/or give me an answer to pass along to you.
Hope that's alright with you, will get back to you as soon as I hear back. Thanks again!
4 Posted by Samuel Wong on 02 Jan, 2012 05:45 PM
Great, thanks Jon. I look forward to hearing back from you.
5 Posted by Oleg on 03 Jan, 2012 02:58 PM
Hi Samuel,
You should be able to test PostageApp::Mailer emails just like you would ActionMailer ones. So
last_delivery = ActionMailer::Base.deliveries.lastwill return a PostageApp::Request object that should respond to your standardtitle,to,body,headers, etc ... If you want to directly test API payload look atlast_delivery.arguments_to_send.Hope this helps.
Oleg