fixing spec with a mock on mailer
This commit is contained in:
parent
32849e693a
commit
6620f33ae2
1 changed files with 3 additions and 1 deletions
|
|
@ -95,7 +95,9 @@ describe User do
|
|||
end
|
||||
|
||||
it 'sends an email to the receiving user' do
|
||||
Notifier.should_receive(:new_request)
|
||||
mail_obj = mock("mailer")
|
||||
mail_obj.should_receive(:deliver)
|
||||
Notifier.should_receive(:new_request).and_return(mail_obj)
|
||||
user.receive @req_xml, person_one
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue