diff options
author | Henare Degan <henare.degan@gmail.com> | 2013-02-25 18:16:12 +1100 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2013-02-25 18:16:12 +1100 |
commit | 3e4ef4da5374c1dd6d32ac9351decc9bb6851355 (patch) | |
tree | 5d4f6c3fc89988fc909d4a39579951d0ef99ebc9 /spec/controllers/request_controller_spec.rb | |
parent | 532a21ba4941197a13524ac3f1ce9267a46bec1d (diff) |
Update to new mail sending API
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 195d1e214..b5612e1f9 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1297,7 +1297,9 @@ describe RequestController, "when classifying an information request" do before do @dog_request.stub!(:is_old_unclassified?).and_return(true) - RequestMailer.stub!(:deliver_old_unclassified_updated) + mail_mock = mock("mail") + mail_mock.stub(:deliver) + RequestMailer.stub!(:old_unclassified_updated).and_return(mail_mock) end describe 'when the user is not logged in' do @@ -1334,7 +1336,7 @@ describe RequestController, "when classifying an information request" do end it 'should send an email to the requester letting them know someone has updated the status of their request' do - RequestMailer.should_receive(:deliver_old_unclassified_updated) + RequestMailer.should_receive(:old_unclassified_updated) post_status('rejected') end @@ -1385,7 +1387,9 @@ describe RequestController, "when classifying an information request" do end it 'should send an email to the requester letting them know someone has updated the status of their request' do - RequestMailer.should_receive(:deliver_old_unclassified_updated) + mail_mock = mock("mail") + mail_mock.stub :deliver + RequestMailer.should_receive(:old_unclassified_updated).and_return(mail_mock) post_status('rejected') end @@ -1424,7 +1428,7 @@ describe RequestController, "when classifying an information request" do end it 'should not send an email to the requester letting them know someone has updated the status of their request' do - RequestMailer.should_not_receive(:deliver_old_unclassified_updated) + RequestMailer.should_not_receive(:old_unclassified_updated) post_status('rejected') end @@ -1465,7 +1469,7 @@ describe RequestController, "when classifying an information request" do end it 'should not send an email to the requester letting them know someone has updated the status of their request' do - RequestMailer.should_not_receive(:deliver_old_unclassified_updated) + RequestMailer.should_not_receive(:old_unclassified_updated) post_status('rejected') end |