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 af00993 commit 5b8dfd9Copy full SHA for 5b8dfd9
test/integration/test_add.rb
@@ -0,0 +1,28 @@
1
+require_relative '../test_helper'
2
+
3
+class TestAddIntegration < LDAPIntegrationTestCase
4
+ def setup
5
+ super
6
+ @ldap.authenticate "cn=admin,dc=rubyldap,dc=com", "passworD1"
7
8
+ @dn = "uid=added-user1,ou=People,dc=rubyldap,dc=com"
9
+ end
10
11
+ def test_add
12
+ attrs = {
13
+ objectclass: %w(top inetOrgPerson organizationalPerson person),
14
+ uid: "added-user1",
15
+ cn: "added-user1",
16
+ sn: "added-user1",
17
+ mail: "added-user1@rubyldap.com"
18
+ }
19
20
+ assert @ldap.add(dn: @dn, attributes: attrs), @ldap.get_operation_result.inspect
21
22
+ assert result = @ldap.search(base: @dn, scope: Net::LDAP::SearchScope_BaseObject).first
23
24
25
+ def teardown
26
+ @ldap.delete dn: @dn
27
28
+end
0 commit comments