Add tests for `hosts` option
This commit is contained in:
Родитель
baca799d8f
Коммит
65e653987f
|
@ -9,6 +9,21 @@ module GitHubLdapTestCases
|
|||
assert @ldap.test_connection, "Ldap connection expected to succeed"
|
||||
end
|
||||
|
||||
def test_connection_with_list_of_hosts_with_one_valid_host
|
||||
ldap = GitHub::Ldap.new(options.merge(hosts: [["localhost", 3897]]))
|
||||
assert ldap.test_connection, "Ldap connection expected to succeed"
|
||||
end
|
||||
|
||||
def test_connection_with_list_of_hosts_with_first_valid
|
||||
ldap = GitHub::Ldap.new(options.merge(hosts: [["localhost", 3897], ["invalid.local", 3897]]))
|
||||
assert ldap.test_connection, "Ldap connection expected to succeed"
|
||||
end
|
||||
|
||||
def test_connection_with_list_of_hosts_with_first_invalid
|
||||
ldap = GitHub::Ldap.new(options.merge(hosts: [["invalid.local", 3897], ["localhost", 3897]]))
|
||||
assert ldap.test_connection, "Ldap connection expected to succeed"
|
||||
end
|
||||
|
||||
def test_simple_tls
|
||||
assert_equal :simple_tls, @ldap.check_encryption(:ssl)
|
||||
assert_equal :simple_tls, @ldap.check_encryption('SSL')
|
||||
|
|
Загрузка…
Ссылка в новой задаче