From b99f5ff1b976601ec860d67bc8b0a0ec404f8599 Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Fri, 8 Jul 2016 17:46:30 -0700 Subject: [PATCH] don't pass headers through to jobs --- src/job.js | 2 -- test/src/job.js | 9 --------- 2 files changed, 11 deletions(-) diff --git a/src/job.js b/src/job.js index 0aa5979..86f6318 100644 --- a/src/job.js +++ b/src/job.js @@ -47,8 +47,6 @@ export default class Job extends events.EventEmitter { } }; - if (options.headers) indexParams.headers = options.headers; - this.ready = createIndex(this.client, this.index, this.doctype, this.indexSettings) .then(() => this.client.index(indexParams)) .then((doc) => { diff --git a/test/src/job.js b/test/src/job.js index 7b4ad7f..17917e9 100644 --- a/test/src/job.js +++ b/test/src/job.js @@ -210,15 +210,6 @@ describe('Job Class', function () { expect(indexArgs.body).to.have.property('priority', minPriority); }); }); - - it('should pass headers to the client', function () { - const headers = { authorization: 'Basic dXNlcjpwYXNzd29yZA==' }; - const job = new Job(client, index, type, payload, Object.assign(options, { headers })); - return job.ready.then(() => { - const indexArgs = validateDoc(client.index); - expect(indexArgs).to.have.property('headers', headers); - }); - }); }); describe('custom client', function () {