Comparing version 6.5.0 to 6.5.1
@@ -472,3 +472,3 @@ 'use strict'; | ||
Items.parallel(Object.keys(this.tables), each, callback); | ||
Items.serial(Object.keys(this.tables), each, callback); | ||
} | ||
@@ -475,0 +475,0 @@ |
{ | ||
"name": "penseur", | ||
"description": "Lightweight RethinkDB wrapper", | ||
"version": "6.5.0", | ||
"version": "6.5.1", | ||
"author": "Eran Hammer <eran@hammer.io> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/hueniverse/penseur", |
@@ -8,2 +8,3 @@ 'use strict'; | ||
const Penseur = require('..'); | ||
const RethinkDB = require('rethinkdb'); | ||
@@ -125,3 +126,3 @@ | ||
it('generates keys', (done) => { | ||
it('generates keys (same table)', (done) => { | ||
@@ -141,2 +142,31 @@ const db = new Penseur.Db('penseurtest'); | ||
it('generates key (different tables)', (done) => { | ||
const db = new Penseur.Db('penseurtest'); | ||
db.connect((err) => { | ||
expect(err).to.not.exist(); | ||
RethinkDB.dbDrop(db.name).run(db._connection, (err, dropped) => { | ||
expect(err).to.not.exist(); | ||
db.establish({ test1: { id: { type: 'increment', table: 'allocate' } }, test2: { id: { type: 'increment', table: 'allocate' } } }, (err) => { | ||
expect(err).to.not.exist(); | ||
db.test1.insert({ a: 1 }, (err, keys1) => { | ||
expect(err).to.not.exist(); | ||
expect(keys1).to.equal('1'); | ||
db.test2.insert({ a: 1 }, (err, keys2) => { | ||
expect(err).to.not.exist(); | ||
expect(keys2).to.equal('1'); | ||
db.close(done); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
it('completes an existing incomplete allocation record', (done) => { | ||
@@ -143,0 +173,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
198888
4759