remove space from dn comparision

This commit is contained in:
James Stenhouse 2020-07-28 09:15:46 +10:00
parent 53c6275610
commit 24d8a6f8b3
3 changed files with 7 additions and 7 deletions

View File

@ -682,7 +682,7 @@ tap.test('search basic', function (t) {
res.on('searchEntry', function (entry) {
t.ok(entry)
t.ok(entry instanceof ldap.SearchEntry)
t.equal(entry.dn.toString(), 'cn=test, ' + SUFFIX)
t.equal(entry.dn.toString(), 'cn=test,' + SUFFIX)
t.ok(entry.attributes)
t.ok(entry.attributes.length)
t.equal(entry.attributes[0].type, 'cn')
@ -1118,7 +1118,7 @@ tap.test('GH-21 binary attributes', function (t) {
res.on('searchEntry', function (entry) {
t.ok(entry)
t.ok(entry instanceof ldap.SearchEntry)
t.equal(entry.dn.toString(), 'cn=bin, ' + SUFFIX)
t.equal(entry.dn.toString(), 'cn=bin,' + SUFFIX)
t.ok(entry.attributes)
t.ok(entry.attributes.length)
t.equal(entry.attributes[0].type, 'foo;binary')
@ -1159,7 +1159,7 @@ tap.test('GH-23 case insensitive attribute filtering', function (t) {
res.on('searchEntry', function (entry) {
t.ok(entry)
t.ok(entry instanceof ldap.SearchEntry)
t.equal(entry.dn.toString(), 'cn=test, ' + SUFFIX)
t.equal(entry.dn.toString(), 'cn=test,' + SUFFIX)
t.ok(entry.attributes)
t.ok(entry.attributes.length)
t.equal(entry.attributes[0].type, 'cn')
@ -1191,7 +1191,7 @@ tap.test('GH-24 attribute selection of *', function (t) {
res.on('searchEntry', function (entry) {
t.ok(entry)
t.ok(entry instanceof ldap.SearchEntry)
t.equal(entry.dn.toString(), 'cn=test, ' + SUFFIX)
t.equal(entry.dn.toString(), 'cn=test,' + SUFFIX)
t.ok(entry.attributes)
t.ok(entry.attributes.length)
t.equal(entry.attributes[0].type, 'cn')

View File

@ -74,7 +74,7 @@ test('toBer', function (t) {
t.equal(ber.readSequence(), 0x30)
t.equal(ber.readInt(), 123)
t.equal(ber.readSequence(), 0x64)
t.equal(ber.readString(), 'cn=foo, o=test')
t.equal(ber.readString(), 'cn=foo,o=test')
t.ok(ber.readSequence())
t.ok(ber.readSequence())

View File

@ -107,8 +107,8 @@ tap.test('route order', function (t) {
const server = ldap.createServer()
const sock = t.context.sock
const dnShort = SUFFIX
const dnMed = 'dc=sub, ' + SUFFIX
const dnLong = 'dc=long, dc=sub, ' + SUFFIX
const dnMed = 'dc=sub,' + SUFFIX
const dnLong = 'dc=long,dc=sub,' + SUFFIX
// Mount routes out of order
server.search(dnMed, generateHandler(dnMed))