Use port from options
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:
Родитель
7be5c555d3
Коммит
9315cee551
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче