aboutsummaryrefslogtreecommitdiffstats
path: root/test/net/smtp
diff options
context:
space:
mode:
Diffstat (limited to 'test/net/smtp')
-rw-r--r--test/net/smtp/test_smtp.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/net/smtp/test_smtp.rb b/test/net/smtp/test_smtp.rb
index 0b8d657559..748b20d65b 100644
--- a/test/net/smtp/test_smtp.rb
+++ b/test/net/smtp/test_smtp.rb
@@ -21,6 +21,19 @@ module Net
end
end
+ def test_critical
+ smtp = Net::SMTP.new 'localhost', 25
+
+ assert_raises RuntimeError do
+ smtp.send :critical do
+ raise 'fail on purpose'
+ end
+ end
+
+ assert_kind_of Net::SMTP::Response, smtp.send(:critical),
+ '[Bug #9125]'
+ end
+
def test_esmtp
smtp = Net::SMTP.new 'localhost', 25
assert smtp.esmtp