From a3c99ba696619865ff8f00444df51d3524c86d0c Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Fri, 2 Jun 2017 15:07:51 -0700 Subject: [PATCH] Explicitly define behavior of empty tls_options --- test/integration/test_bind.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/integration/test_bind.rb b/test/integration/test_bind.rb index bd1281e2..7f44dab3 100644 --- a/test/integration/test_bind.rb +++ b/test/integration/test_bind.rb @@ -122,6 +122,25 @@ def test_bind_tls_with_valid_hostname_default_opts_passes @ldap.get_operation_result.inspect end + def test_bind_tls_with_valid_hostname_no_tls_options_passes + @ldap.host = 'localhost' + @ldap.encryption( + method: :start_tls, + ) + assert @ldap.bind(BIND_CREDS), + @ldap.get_operation_result.inspect + end + + def test_bind_tls_with_valid_hostname_empty_tls_options_passes + @ldap.host = 'localhost' + @ldap.encryption( + method: :start_tls, + tls_options: {}, + ) + assert @ldap.bind(BIND_CREDS), + @ldap.get_operation_result.inspect + end + def test_bind_tls_with_valid_hostname_just_verify_peer_ca_passes @ldap.host = 'localhost' @ldap.encryption(