From 576f26a4b9c21cea57104cb37fe1cd84de0c2701 Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Mon, 25 Apr 2016 14:43:53 -0700 Subject: [PATCH] allow id to be passed to mock elasticsearch index --- test/fixtures/elasticsearch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/elasticsearch.js b/test/fixtures/elasticsearch.js index eb4d0ad..118c002 100644 --- a/test/fixtures/elasticsearch.js +++ b/test/fixtures/elasticsearch.js @@ -15,7 +15,7 @@ Client.prototype.index = function (params) { return Promise.resolve({ _index: params.index || 'index', _type: params.type || 'type', - _id: uniqueId('testDoc'), + _id: params.id || uniqueId('testDoc'), _version: 1, _shards: { total: shardCount, successful: shardCount, failed: 0 }, created: true