diff options
author | lholden <lholden@yellowpages.com> | 2009-01-21 16:17:24 -0800 |
---|---|---|
committer | lholden <lholden@yellowpages.com> | 2009-01-21 16:17:24 -0800 |
commit | 19f8bb2808316dfca1f009538c3505ba144f614b (patch) | |
tree | 1ab9e925e83b988ed2a1858aa19236e2bcd79a60 /actionmailer/test/mail_service_test.rb | |
parent | b8fadd708b9850a77e1f64038763fffcff502499 (diff) | |
parent | 73cc5f270a5c2a2eab76c6c02615fec608822494 (diff) | |
download | rails-19f8bb2808316dfca1f009538c3505ba144f614b.tar.gz rails-19f8bb2808316dfca1f009538c3505ba144f614b.tar.bz2 rails-19f8bb2808316dfca1f009538c3505ba144f614b.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionmailer/test/mail_service_test.rb')
-rw-r--r-- | actionmailer/test/mail_service_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 15a40552c9..a886b1143e 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -948,6 +948,7 @@ EOF end def test_starttls_is_enabled_if_supported + ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(true) MockSMTP.any_instance.expects(:enable_starttls_auto) ActionMailer::Base.delivery_method = :smtp @@ -955,11 +956,22 @@ EOF end def test_starttls_is_disabled_if_not_supported + ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(false) MockSMTP.any_instance.expects(:enable_starttls_auto).never ActionMailer::Base.delivery_method = :smtp TestMailer.deliver_signed_up(@recipient) end + + def test_starttls_is_not_enabled + ActionMailer::Base.smtp_settings[:enable_starttls_auto] = false + MockSMTP.any_instance.expects(:respond_to?).never + MockSMTP.any_instance.expects(:enable_starttls_auto).never + ActionMailer::Base.delivery_method = :smtp + TestMailer.deliver_signed_up(@recipient) + ensure + ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true + end end end # uses_mocha |