summaryrefslogtreecommitdiff
path: root/test/net/smtp/test_smtp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/net/smtp/test_smtp.rb')
-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 0b8d657..748b20d 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