Skip to content

Commit c47b6cd

Browse files
committed
Fix the error introduced by the previous change which should finally resolve #4
1 parent c18de67 commit c47b6cd

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/main/java/org/zapodot/junit/ldap/EmbeddedLdapRuleBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public EmbeddedLdapRuleBuilder bindingToAddress(final String address) {
136136
* @return same EmbeddedLdapRuleBuilder instance with the withoutDefaultSchema field set to FALSE
137137
*/
138138
public EmbeddedLdapRuleBuilder withoutDefaultSchema() {
139-
this.addDefaultSchema = true;
139+
this.addDefaultSchema = false;
140140
return this;
141141
}
142142

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package org.zapodot.junit.ldap;
2+
3+
import com.unboundid.ldap.sdk.schema.AttributeTypeDefinition;
4+
import org.junit.Rule;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.assertNotNull;
8+
9+
public class EmbeddedLdapRuleCustomSchemaDuplicatedTest {
10+
11+
@Rule
12+
public EmbeddedLdapRule embeddedLdapRule = EmbeddedLdapRuleBuilder.newInstance()
13+
.withSchema("standard-schema.ldif")
14+
.build();
15+
16+
@Test
17+
public void testFindCustomAttribute() throws Exception {
18+
final AttributeTypeDefinition changelogAttribute =
19+
embeddedLdapRule.ldapConnection().getSchema().getAttributeType("changelog");
20+
assertNotNull(changelogAttribute);
21+
22+
}
23+
}

0 commit comments

Comments
 (0)