Sha256: a45b4f37d91f9db6a32b6bd9ebc36794bb28b05c473be57b797e62b8b3fe7616

Contents?: true

Size: 700 Bytes

Versions: 7

Compression:

Stored size: 700 Bytes

Contents

require_relative '../test_helper'

class TestAddIntegration < LDAPIntegrationTestCase
  def setup
    super
    @ldap.authenticate "cn=admin,dc=rubyldap,dc=com", "passworD1"

    @dn = "uid=added-user1,ou=People,dc=rubyldap,dc=com"
  end

  def test_add
    attrs = {
      objectclass: %w(top inetOrgPerson organizationalPerson person),
      uid:  "added-user1",
      cn:   "added-user1",
      sn:   "added-user1",
      mail: "added-user1@rubyldap.com"
    }

    assert @ldap.add(dn: @dn, attributes: attrs), @ldap.get_operation_result.inspect

    assert result = @ldap.search(base: @dn, scope: Net::LDAP::SearchScope_BaseObject).first
  end

  def teardown
    @ldap.delete dn: @dn
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
net-ldap-0.13.0 test/integration/test_add.rb
net-ldap-0.12.1 test/integration/test_add.rb
net-ldap-0.12.0 test/integration/test_add.rb
net-ldap-0.11 test/integration/test_add.rb
net-ldap-0.10.1 test/integration/test_add.rb
net-ldap-0.10.0 test/integration/test_add.rb
net-ldap-0.9.0 test/integration/test_add.rb