Skip to content

Commit 80bab6c

Browse files
author
Tom Maher
committed
handle both exceptions
1 parent c801132 commit 80bab6c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/integration/test_bind.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def test_bind_tls_with_bad_hostname
6161
tls_options: TLS_OPTS.merge(verify_mode: OpenSSL::SSL::VERIFY_PEER,
6262
ca_file: CA_FILE),
6363
)
64-
error = assert_raise Net::LDAP::ConnectionRefusedError do
64+
error = assert_raise Net::LDAP::Error,
65+
Net::LDAP::ConnectionRefusedError do
6566
@ldap.bind BIND_CREDS
6667
end
6768
assert_equal(
@@ -108,7 +109,8 @@ def test_bind_tls_with_multiple_bogus_hosts
108109
tls_options: TLS_OPTS.merge(verify_mode: OpenSSL::SSL::VERIFY_PEER,
109110
ca_file: CA_FILE),
110111
)
111-
error = assert_raise Net::LDAP::ConnectionRefusedError do
112+
error = assert_raise Net::LDAP::Error,
113+
Net::LDAP::ConnectionRefusedError do
112114
@ldap.bind BIND_CREDS
113115
end
114116
assert_equal("TODO - fix this",

0 commit comments

Comments
 (0)