We don't care too much about the port in testing. Using the port in the options allows us to test against ApacheDS and OpenLDAP without adding any additional conditionals.
This commit is contained in:
Colin Seymour 2016-09-16 16:28:02 +01:00
Родитель 7be5c555d3
Коммит 9315cee551
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 88109C73073E7080
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -10,17 +10,17 @@ module GitHubLdapTestCases
end
def test_connection_with_list_of_hosts_with_one_valid_host
ldap = GitHub::Ldap.new(options.merge(hosts: [["localhost", 3897]]))
ldap = GitHub::Ldap.new(options.merge(hosts: [["localhost", options[:port]]]))
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]]))
ldap = GitHub::Ldap.new(options.merge(hosts: [["localhost", options[:port]], ["invalid.local", options[:port]]]))
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]]))
ldap = GitHub::Ldap.new(options.merge(hosts: [["invalid.local", options[:port]], ["localhost", options[:port]]]))
assert ldap.test_connection, "Ldap connection expected to succeed"
end