add tests for passing client on job create

also fix issue where the wrong client was being used to create the index
This commit is contained in:
2016-06-06 14:48:01 -07:00
parent dcecd4020b
commit a1a7b9e213
2 changed files with 46 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ export default class Job extends events.EventEmitter {
this.debug = (...msg) => debug(...msg, `id: ${this.id}`);
this.ready = createIndex(client, index, this.doctype)
this.ready = createIndex(this.client, this.index, this.doctype)
.then(() => {
return this.client.index({
index: this.index,