From b33bde5fb1c6982943f166f6f9d0788432c11e7d Mon Sep 17 00:00:00 2001 From: Joachim Filip Ignacy Bartosik Date: Fri, 13 Aug 2010 10:56:37 +0200 Subject: Improve coverage of UserMailer model --- spec/models/user_mailer_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/models/user_mailer_spec.rb b/spec/models/user_mailer_spec.rb index 4e7c613..9c205cd 100644 --- a/spec/models/user_mailer_spec.rb +++ b/spec/models/user_mailer_spec.rb @@ -66,4 +66,10 @@ describe UserMailer do # don't test rest of the message notification.should have_text(/If you are answering question check if your message has proper subject./) end + + it "should pass received emails to EmailAnswer#answer_from_email" do + mail = TMail::Mail.new + EmailAnswer.should_receive(:answer_from_email) + UserMailer.receive(mail.to_s) + end end -- cgit v1.2.3-65-gdbad