Sha256: 5e073f7055ea36fa73342f02deff51c5bd6f30420a4db05d9b2c3019cf770a70

Contents?: true

Size: 441 Bytes

Versions: 1

Compression:

Stored size: 441 Bytes

Contents

require 'test_helper'

class TestAuthAdapter < Test::Unit::TestCase
  def test_undefined_auth_adapter
    flexmock(Socket).should_receive(:tcp).ordered.with('ldap.example.com', 379, { connect_timeout: 5 }).once.and_return(nil)

    conn = Net::LDAP::Connection.new(host: 'ldap.example.com', port: 379)
    assert_raise Net::LDAP::AuthMethodUnsupportedError, "Unsupported auth method (foo)" do
      conn.bind(method: :foo)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
net-ldap-0.13.0 test/test_auth_adapter.rb