Sha256: 08d8c14d5bb90d87fb10ac2df681c08b0aaad094a6e604eec93986635030d965

Contents?: true

Size: 895 Bytes

Versions: 15

Compression:

Stored size: 895 Bytes

Contents

require 'common'

class TestLDAP < Test::Unit::TestCase
  def test_modify_ops_delete
    args = { :operations => [ [ :delete, "mail" ] ] }
    result = Net::LDAP::Connection.modify_ops(args[:operations])
    expected = [ "0\r\n\x01\x010\b\x04\x04mail1\x00" ]
    assert_equal(expected, result)
  end

  def test_modify_ops_add
    args = { :operations => [ [ :add, "mail", "testuser@example.com" ] ] }
    result = Net::LDAP::Connection.modify_ops(args[:operations])
    expected = [ "0#\n\x01\x000\x1E\x04\x04mail1\x16\x04\x14testuser@example.com" ]
    assert_equal(expected, result)
  end

  def test_modify_ops_replace
    args = { :operations =>[ [ :replace, "mail", "testuser@example.com" ] ] }
    result = Net::LDAP::Connection.modify_ops(args[:operations])
    expected = [ "0#\n\x01\x020\x1E\x04\x04mail1\x16\x04\x14testuser@example.com" ]
    assert_equal(expected, result)
  end
end

Version data entries

15 entries across 15 versions & 7 rubygems

Version Path
net-ldap-0.8.0 test/test_ldap_connection.rb
net-ldap-0.7.0 test/test_ldap_connection.rb
net-ldap-0.6.1 test/test_ldap_connection.rb
net-ldap-0.6.0 test/test_ldap_connection.rb
net-ldap-0.5.1 test/test_ldap_connection.rb
datacom-net-ldap-0.5.0.datacom test/test_ldap_connection.rb
adams-net-ldap-0.4.0 test/test_ldap_connection.rb
obis-net-ldap-0.4.0 test/test_ldap_connection.rb
net-ldap-1-0.4.0 test/test_ldap_connection.rb
net-ldap-0.3.1 test/test_ldap_connection.rb
net-ldap-0.3.0 test/test_ldap_connection.rb
prathe_net-ldap-0.2.20110317223538 test/test_ldap_connection.rb
prathe-net-ldap-0.2.20110317223538 test/test_ldap_connection.rb
net-ldap-0.2.2 test/test_ldap_connection.rb
net-ldap-0.2.1 test/test_ldap_connection.rb