We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 259f18a commit f6ad189Copy full SHA for f6ad189
test/test_auth_adapter.rb
@@ -1,9 +1,14 @@
1
require 'test_helper'
2
3
class TestAuthAdapter < Test::Unit::TestCase
4
+ class FakeSocket
5
+ def initialize(*args)
6
+ end
7
8
+
9
def test_undefined_auth_adapter
- flexmock(TCPSocket).should_receive(:new).ordered.with('ldap.example.com', 379).once.and_return(nil)
10
conn = Net::LDAP::Connection.new(host: 'ldap.example.com', port: 379)
11
+ conn.socket_class = FakeSocket
12
assert_raise Net::LDAP::AuthMethodUnsupportedError, "Unsupported auth method (foo)" do
13
conn.bind(method: :foo)
14
end
0 commit comments