Skip to content

Add the ability to provide a list of hosts for a connection #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 29, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove enumerable enforcement attempt in tests
  • Loading branch information
Jeremy Bopp committed Sep 28, 2015
commit c0db1d17d4b29da18cc77540177f41c265ad18d0
6 changes: 3 additions & 3 deletions test/test_ldap_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_list_of_hosts_with_first_host_successful
]
flexmock(TCPSocket).should_receive(:new).ordered.with(*hosts[0]).once.and_return(nil)
flexmock(TCPSocket).should_receive(:new).ordered.never
Net::LDAP::Connection.new(:hosts => hosts.to_enum(:each))
Net::LDAP::Connection.new(:hosts => hosts)
end

def test_list_of_hosts_with_first_host_failure
Expand All @@ -29,7 +29,7 @@ def test_list_of_hosts_with_first_host_failure
flexmock(TCPSocket).should_receive(:new).ordered.with(*hosts[0]).once.and_raise(SocketError)
flexmock(TCPSocket).should_receive(:new).ordered.with(*hosts[1]).once.and_return(nil)
flexmock(TCPSocket).should_receive(:new).ordered.never
Net::LDAP::Connection.new(:hosts => hosts.to_enum(:each))
Net::LDAP::Connection.new(:hosts => hosts)
end

def test_list_of_hosts_with_all_hosts_failure
Expand All @@ -43,7 +43,7 @@ def test_list_of_hosts_with_all_hosts_failure
flexmock(TCPSocket).should_receive(:new).ordered.with(*hosts[2]).once.and_raise(SocketError)
flexmock(TCPSocket).should_receive(:new).ordered.never
assert_raise Net::LDAP::Error do
Net::LDAP::Connection.new(:hosts => hosts.to_enum(:each))
Net::LDAP::Connection.new(:hosts => hosts)
end
end

Expand Down