filter output when searching for jobs

This commit is contained in:
2016-05-16 14:06:28 -07:00
parent 0bf6fb0023
commit 9aa8eed297
2 changed files with 10 additions and 0 deletions

View File

@@ -221,6 +221,13 @@ describe('Worker class', function () {
clock.restore();
});
it('should filter unwanted source data', function () {
const excludedFields = [ 'output.content' ];
const { body } = getSearchParams(jobtype);
expect(body).to.have.property('_source');
expect(body._source).to.eql({ exclude: excludedFields });
});
it('should search by job type', function () {
const { body } = getSearchParams(jobtype);
const conditions = get(body, conditionPath);